MCP Tools

Tools Overview

How Strata's five MCP tools work together in a typical AI coding workflow.

Strata exposes 5 MCP tools. They are designed to be used in a simple, predictable order so AI agents only read the code they actually need:

  1. Orient first (map_workspace) — see packages, frameworks, routes, or file lists without reading file contents.
  2. Inspect interfaces (inspect_file) — read a file's symbol outline, TypeScript-resolved props/emits/slots, and outbound API calls without reading the full implementation.
  3. Trace relationships (query_graph) or find usages (search_code) — check definitions, references, component trees, state flow, or refactor impact across packages.
  4. Read exact code (read_slice) — fetch only the specific symbol body, SFC block, or line range using the sourceRef or symbolId returned by earlier tools.

Tool Summary

ToolPrimary PurposeBacking Engine
map_workspacePackages, frameworks, routes, file lists, unused component candidatesSQLite index
inspect_fileSymbol outline, props/emits/models/slots, rendered children, HTTP callsSQLite index + TypeScript Language Service
query_graphDefinitions, references, call hierarchy, component tree, state flow, impactSQLite index + TypeScript Language Service
read_sliceBounded, hash-verified source slicesDirect disk read + SHA-256 check
search_codeSymbol search (FTS5), component usage, prop usage, literal textSQLite FTS5 + in-process scanner

Common Response Options

All tools share the same conventions:

  • format: Defaults to "text" (compact, token-friendly output). Pass "json" when you need structured fields.
  • limit & cursor: Paginated tools return nextCursor (o_<offset>) when more items are available.
  • max_bytes: Defaults to 16384 UTF-8 bytes so a single tool call never floods the prompt. If a response exceeds the limit, Strata returns BUDGET_RESPONSE_TOO_LARGE with a suggested retryMaxBytes or narrowing filter.