Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MCP Tools & Prompts

Tools

Shire exposes the following tools over the Model Context Protocol:

ToolDescription
search_packagesSearch packages by name or description. Use instead of Grep for finding packages.
list_packagesList all indexed packages, optionally filtered by kind
package_dependenciesList a package’s dependencies. Set depth>1 for transitive graph (returns edge list with different schema).
package_dependentsFind all packages that depend on this package
search_symbolsFind functions, classes, types, methods by name or signature. Use instead of Grep for “where is function X?” or “what matches pattern Y?”. Omit query with a package filter to list all symbols in that package. Supports hybrid FTS + vector search when RAG is enabled.
get_file_symbolsList all symbols defined in a specific file. Use instead of reading the file to understand its exports.
search_filesFind files by path or name. Use instead of Glob/find for locating files. Useful for “middleware”, “proto files”, or files in a specific directory.
search_docsSearch documentation files by content, title, or path — returns matching docs with text snippets
list_package_filesList all files in a package, optionally filtered by extension. Use instead of Glob for listing package contents.
exploreExplore a concept across the codebase — searches packages, symbols, files, and documentation semantically. Use as the first tool when investigating unfamiliar code or broad topics like “authentication” or “error handling”. Returns a structured context map organized by package.
index_statusIndex build metadata: timestamp, git commit, counts
symbol_referencesFind all references to a symbol by name. Returns [{name, kind, file_path, line, package, enclosing_symbol}]. Accepts optional kind and package filters. Requires symbols.references_enabled = true (experimental, opt-in). Note: matching is name-based — same-name symbols across different packages are merged.
symbol_callersList all callers of a symbol (call-site references). Returns [{caller_name, caller_file, caller_line, call_sites}]. Accepts optional package filter. Requires symbols.references_enabled = true. Same name-based-match caveat as symbol_references.
symbol_calleesList what a function calls (outbound call graph). Returns [{callee_name, call_sites}]. Accepts optional package filter. Requires symbols.references_enabled = true. Same name-based-match caveat as symbol_references.
change_impactAnalyze the blast radius of changing a symbol. Combines cross-references with the dependency graph to return {direct_impact, cross_package_impact, transitive_impact, summary}. Use before renaming, changing a signature, or deleting a symbol. Accepts optional package (home package hint, for disambiguation), transitive_depth (default 2), and limit. Requires symbols.references_enabled = true. Same name-based-match caveat as symbol_references.
schema_consumersFind all files generated from a schema file (e.g. .proto). Returns generated file paths and their packages. Use to understand the blast radius of a schema change.
generated_fromFind the source schema file that generated a given file. Use to trace a generated file (e.g. user.pb.go) back to its source proto.

When to use Shire vs Grep/Glob

TaskUseNot
Find a function, class, or type by namesearch_symbolsGrep
Find a file by name or pathsearch_filesGlob / find
List files in a packagelist_package_filesGlob
Find a packagesearch_packagesGrep
Explore an unfamiliar areaexploremultiple Grep calls
Search for a literal string or log messageGrepShire
Search inside function bodiesGrepShire
Pattern match on file contentsGrepShire

Prompts

Prompts are pre-built templates that compose multiple queries into structured context. They give your AI a map of where concepts live in the codebase.

PromptArgsDescription
explorequerySearch packages, symbols, files, and documentation for a concept — returns a structured context map organized by package
reference_auditnameGuides refactor-safety analysis for a symbol: classifies refs by kind, traces the call graph via symbol_callers, identifies cross-package impact, and assesses rename/change risk. Requires symbols.references_enabled = true (experimental).