setupPrompts() — mcp Function Reference
Architecture documentation for the setupPrompts() function in server.ts from the mcp codebase.
Entity Profile
Dependency Diagram
graph TD fe553e0d_7d2a_65bf_5564_003fcd15f4bd["setupPrompts()"] fb3524f1_6068_fb0f_15f3_83e2b15a3f3f["constructor()"] fb3524f1_6068_fb0f_15f3_83e2b15a3f3f -->|calls| fe553e0d_7d2a_65bf_5564_003fcd15f4bd style fe553e0d_7d2a_65bf_5564_003fcd15f4bd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/server.ts lines 203–239
private setupPrompts() {
this.server.prompt(
'lookup-symbol',
'Look up a symbol (function, class, or method) in a codebase — returns source code, callers, callees, and architectural domain',
{
symbol: z.string().describe('Name of the symbol to look up (e.g. "filter_queryset", "UserModel.save")'),
directory: z.string().optional().describe('Path to the repository directory'),
},
({ symbol, directory }) => ({
messages: [{
role: 'user' as const,
content: {
type: 'text' as const,
text: `Use the symbol_context tool to look up "${symbol}"${directory ? ` in the repository at ${directory}` : ''}. Return the definition location, source code, callers, callees, and architectural domain.`,
},
}],
}),
);
this.server.prompt(
'explore-architecture',
'Explore the architectural structure of a codebase — surfaces subsystems, entry points, and key components via the codebase overview',
{
directory: z.string().describe('Path to the repository directory'),
focus: z.string().optional().describe('Optional area or subsystem to focus on'),
},
({ directory, focus }) => ({
messages: [{
role: 'user' as const,
content: {
type: 'text' as const,
text: `Explore the architecture of the repository at ${directory}${focus ? `, focusing on ${focus}` : ''}. Use the symbol_context tool to look up key classes and entry points. Summarize the main subsystems, their responsibilities, and how they interact.`,
},
}],
}),
);
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does setupPrompts() do?
setupPrompts() is a function in the mcp codebase.
What calls setupPrompts()?
setupPrompts() is called by 1 function(s): constructor.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free