Skip to content

Commit 215cfe8

Browse files
authored
Merge pull request #325 from mlennie/monty/agent-mcp-server-docs
docs(publishing): document the agent MCP server (retrieval tools and skills)
2 parents e45c8be + 6a7fab9 commit 215cfe8

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

‎src/documentation/user_guides/publishing/mcp_agents.malloynb‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,33 @@ Publisher exposes these tools to AI agents:
107107

108108
---
109109

110+
## Agent Retrieval Tools and Skills
111+
112+
Alongside the core MCP server on `:4040`, Publisher runs a second MCP server for agents on `:4041` (set by `AGENT_MCP_PORT`). It serves two read-only retrieval tools plus the bundled agent skills, configured the same way as the core server but on the agent endpoint:
113+
114+
```json
115+
{
116+
"mcpServers": {
117+
"malloy-publisher-agent": {
118+
"url": "http://localhost:4041/mcp"
119+
}
120+
}
121+
}
122+
```
123+
124+
### Retrieval tools
125+
126+
| Tool | Parameters | Description |
127+
|------|------------|-------------|
128+
| `malloy_getContext` | `environmentName`, `packageName`, `query`, `sourceName` (optional), `limit` (optional) | Given a plain-English question, returns the model entities (sources, views, named queries, and dimension/measure fields) most relevant to it, each with its model path and `#(doc)` description. |
129+
| `malloy_searchDocs` | `query`, `limit` (optional) | Keyword search over a bundled index of the Malloy documentation, returning matching pages with a short excerpt and a link. |
130+
131+
Use `malloy_getContext` in two phases: call it once with just a `query` to discover the most relevant sources and views, then optionally call it again with `sourceName` set to focus on the fields within one source. The `environmentName`, `packageName`, and `modelPath` it returns map directly onto `malloy_executeQuery`, so an agent can go from a question to a grounded query without guessing field names.
132+
133+
### Skills as MCP prompts
134+
135+
Publisher also ships a set of agent **skills**: short guides that teach an agent how to write Malloy, choose charts, and verify results. Skill-aware hosts (such as Claude Code and Claude Desktop) load the skill files directly. For hosts that only ingest MCP, the agent server also exposes each skill as an MCP prompt, so the same guidance is available either way: list them with `prompts/list` on the agent endpoint and fetch one with `prompts/get`.
136+
110137
## Example Prompts
111138

112139
Once connected, try these prompts:

0 commit comments

Comments
 (0)