# MCP workflow

Read this reference only when SPYN3 MCP tools are available in the runtime.

## Tools

| Tool | Arguments | Use |
|---|---|---|
| `search_workspace` | `query` (string), optional `limit` (integer) | Find ranked passages and source records without synthesis. |
| `query_workspace` | `query` (string), optional `limit` (integer) | Produce a natural-language answer with supporting sources. |
| `list_sources` | none | Inspect sources visible to the credential. |
| `get_document` | `document_id` (string) | Retrieve bounded detail for a document already selected by stable ID. |

The server is stateless. The connected credential resolves one workspace and gates
tools by permission. Do not supply or infer a workspace ID.

## Selection rules

- Prefer `search_workspace` for research, comparison, exact wording, or when the
  evidence must be assessed before synthesis.
- Prefer `query_workspace` for a direct answer whose source records still need to
  be preserved.
- Prefer `get_document` after search; do not guess IDs or use it as broad discovery.
- Use `list_sources` when an empty result might mean the relevant source is absent.

Treat tool errors as data. On invalid arguments, correct the specific argument once.
On permission errors, report the missing access without requesting or seeking a
broader credential. On an empty result, refine once and then state the evidence gap.

SPYN3 tool content may use a compact text representation. Preserve field labels,
document IDs, titles, connector IDs, snippets, and relevance scores when parsing it.
