Skip to main content
Glama

get_blueprint

Retrieve a tech stack blueprint by ID to access deterministic scoring across 30+ technologies for development recommendations.

Instructions

Fetches an existing blueprint by ID. Blueprints are generated via the StacksFinder web UI. Requires API key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blueprintIdYesBlueprint UUID

Implementation Reference

  • The main handler function executeGetBlueprint that fetches the blueprint from the API using getBlueprintRequest, formats it with formatBlueprint, and handles errors.
    export async function executeGetBlueprint( input: GetBlueprintInput ): Promise<{ text: string; isError?: boolean }> { const { blueprintId } = input; debug('Fetching blueprint', { blueprintId }); try { const response = await getBlueprintRequest<BlueprintApiResponse>(blueprintId); const text = formatBlueprint(response); return { text }; } catch (err) { if (err instanceof McpError) { // Add helpful suggestion for NOT_FOUND if (err.code === ErrorCode.NOT_FOUND) { err.suggestions = [ 'Blueprints are generated via the StacksFinder web UI.', 'Visit https://stacksfinder.com to create a new blueprint.' ]; } return { text: err.toResponseText(), isError: true }; } const error = new McpError( ErrorCode.API_ERROR, err instanceof Error ? err.message : 'Failed to fetch blueprint' ); return { text: error.toResponseText(), isError: true }; } }
  • Zod schema for validating the input to the get_blueprint tool, requiring a blueprintId UUID.
    export const GetBlueprintInputSchema = z.object({ blueprintId: z.string().uuid().describe('Blueprint UUID') });
  • src/server.ts:219-241 (registration)
    Registers the 'get_blueprint' tool with the MCP server, specifying input schema, annotations, and wiring the executeGetBlueprint handler.
    server.registerTool( getBlueprintToolDefinition.name, { title: 'Get Blueprint', description: getBlueprintToolDefinition.description, inputSchema: { blueprintId: z.string().uuid().describe('Blueprint UUID') }, annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false } }, async (args) => { debug('get_blueprint called', args); const input = GetBlueprintInputSchema.parse(args); const { text, isError } = await executeGetBlueprint(input); return { content: [{ type: 'text', text }], isError }; }
  • MCP tool definition including name, description, and strict input schema used during registration.
    export const getBlueprintToolDefinition = { name: 'get_blueprint', description: 'Fetches an existing blueprint by ID. Blueprints are generated via the StacksFinder web UI. Requires API key.', inputSchema: { type: 'object' as const, properties: { blueprintId: { type: 'string', format: 'uuid', description: 'Blueprint UUID' } }, required: ['blueprintId'] } };
  • Helper function that formats the raw API blueprint response into a readable Markdown table with project details and tech stack.
    function formatBlueprint(blueprint: BlueprintApiResponse): string { const projectName = blueprint.projectContext?.projectName || 'Unnamed Project'; const projectType = blueprint.projectContext?.projectType || 'Unknown'; const scale = blueprint.projectContext?.scale || 'mvp'; const createdDate = new Date(blueprint.createdAt).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }); let text = `## Blueprint: ${projectName} **ID**: ${blueprint.id} **Type**: ${projectType} **Scale**: ${scale} **Created**: ${createdDate} ### Selected Stack | Category | Technology | |----------|------------| `; for (const tech of blueprint.selectedTechs) { text += `| ${tech.category} | ${tech.technology} |\n`; } if (blueprint.narrative) { text += ` ### Narrative ${blueprint.narrative}`; } return text; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hoklims/stacksfinder-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server