Analyze and Share

Which Credible surface to use for each job (chat clients, coding agents, your own agent, chat in the app, reports, data apps, shared workspaces, Slack, APIs) and how answers are grounded in your data model

People and agents ask questions of a published package from several places. Each surface below reads the same published models and runs each query as the person or API key asking, so the same question gets the same answer everywhere.

Choose a Surface

SurfaceUse it toGuide
Chat clientsAsk from Claude, ChatGPT or another MCP chat clientChat Clients
Coding agentsQuery published models from Claude Code, Codex, Cursor and other coding toolsCoding Agents
Your own agentConnect an agent or service to the MCP server with an API keyMCP Server and Tools
Chat in the appAsk the in-app agent and see the query behind each answerChat with Your Data
ReportsSave dashboards and notebooks with filter controls that anyone with access can reopenReports
Data appsShip a custom HTML and JavaScript app inside a packageData Apps
Shared workspacesGive a team its packages, chats and reports in one place, with its own MCP URLShare with a Workspace
SlackAsk the Credible bot in a channel or a direct messageSlack
REST APIsRun queries, read model context or manage Credible from codeREST APIs

How It Works

Every surface answers a question the same way: retrieve the relevant part of the model, write a Malloy query against it, and run that query under the caller's access rules.

At publish: index the model

When a package is published, Credible indexes what its models declare: sources, dimensions, measures and views, the #(doc) descriptions on them, and the values of dimensions tagged #(index). Retrieval searches that index. Descriptions and Value Search covers how to write those tags.

At question time: retrieve, write, run

  1. Retrieve. The agent calls get_context with the concepts the question needs. Retrieval matches them by meaning as well as by exact name, and returns the matching sources, fields, views and indexed values with their descriptions. It returns only the part of the model that matches, and it does not return a query.
  2. Write. The agent writes a Malloy query from the fields get_context returned, using the field names exactly as returned.
  3. Run. The agent calls execute_query. Credible compiles the query against the published model and runs it on your database as the caller, so the model's row and column access rules apply to every result.

The agent repeats these steps as the conversation goes on. In the Credible app, the chat shows each step, including the Malloy query an answer ran.

Improving answers

Retrieval can only find what the model declares and describes. When an agent picks the wrong field or can't find a concept, the fix is usually in the model: add or sharpen a #(doc) description, or tag a dimension #(index) so its values can be found, then publish a new version. Every surface picks up the change.

Next Steps

On this page