> ## Documentation Index
> Fetch the complete documentation index at: https://kast.michne.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP contract

> Discover Kast tools, call one by name, and decode the direct MCP result.

The installed Kast MCP process runs over stdio from the client's repository
directory. After MCP negotiation, `tools/list` is the authority for this
release's tool names, `inputSchema`, and `outputSchema`.

| Read tools                           | Purpose                                                  |
| ------------------------------------ | -------------------------------------------------------- |
| `query_symbols`                      | Declarations, exact references, relations, and pipelines |
| `read_source`                        | Bounded source for an admitted selector                  |
| `check_diagnostics`                  | IDEA diagnostics for a path                              |
| `health_check`, `validate_workspace` | Readiness and explicit probes                            |

`add_declaration` is the write tool. The App Server's `workspace_lifecycle` is a
separate hosted tool.

## Call and result

An MCP client sends a JSON-RPC tool call after negotiation:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {"name": "health_check", "arguments": {}}
}
```

For a query, set `name` to `query_symbols` and use the
[example arguments](/search). A call returns a JSON-RPC `result` with
`content`, `isError`, and, when the document is admitted,
`structuredContent`.

`structuredContent` is the canonical operation document itself. Its `status`
is `complete`, `qualified`, or `rejected`, with the operation's exact references,
coverage, finite failures, and recovery evidence intact. An invocation failure
uses `isError` and may have no `structuredContent`. The generated
[tool call wrapper](/reference/models/mcp-tool-call-result) describes the MCP
transport; use the generated tool response schema to decode the semantic document.

The OpenAPI `POST /callables/…` labels in this pane organize hosted tool
schemas. They are documentation paths, not HTTP endpoints. The direct MCP
result uses the wrapper above.
