Metadata tags in Malloy serve two purposes: they document your model for human readers, and they enable AI agents to discover and understand your data through the Credible Context Engine. When you publish a model to Credible, metadata is indexed and becomes searchable—both by people browsing your models and by AI agents answering natural language questions.Documentation Index
Fetch the complete documentation index at: https://docs.credibledata.com/llms.txt
Use this file to discover all available pages before exploring further.
Documentation Tags
Use#(doc) tags to add human-readable descriptions to fields. Place the tag on the line before the field definition.
Value Indexing
Use#(index) to index all distinct values from a column. This enables AI agents to find fields by searching for data values, not just field names or descriptions.
Why Value Indexing Matters
Consider a product catalog where the column is namedproduct_category but contains values like “Running Shoes” and “Athletic Apparel”.
Without value indexing, when a user asks an MCP-connected AI assistant “What are our top-selling sports gear products?”, the system can only search field names and documentation—it won’t find these products.
With value indexing, the Credible Context Engine indexes the actual values. When a user submits a natural language query, the engine identifies fields with values that match the query, then uses these retrieved fields to help an agent construct a query with the correct filter value—finding “Running Shoes” and “Athletic Apparel” without exact string matching.
When to Use Value Indexing
Use#(index) on:
- Names and titles - Product names, customer names, program titles
- Categorical values - Status codes, types, categories
- Lookup values - Region names, department names, brand names
- Numeric fields (amounts, counts, IDs)
- Timestamps and dates
Example: Well-Documented Model
Next Steps
Credible Context Engine
Learn how metadata powers AI discovery
Publish Your Model
Make your documented model available to the platform