Skip to main content
Glama

get_blueprint

Retrieve a specific tech stack blueprint by its unique ID to access pre-configured technology recommendations for development projects.

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

  • Main handler function that fetches the blueprint from the StacksFinder API using getBlueprintRequest, formats it into a markdown table with project details and selected technologies using formatBlueprint, and handles errors appropriately.
    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 input schema validation for the get_blueprint tool, requiring a blueprintId UUID.
    export const GetBlueprintInputSchema = z.object({ blueprintId: z.string().uuid().describe('Blueprint UUID') });
  • src/server.ts:194-212 (registration)
    MCP server registration of the get_blueprint tool, using the tool definition for name/description, defining JSON input schema, and providing a wrapper handler that validates input with Zod and delegates to executeGetBlueprint.
    server.registerTool( getBlueprintToolDefinition.name, { title: 'Get Blueprint', description: getBlueprintToolDefinition.description, inputSchema: { blueprintId: z.string().uuid().describe('Blueprint UUID') } }, async (args) => { debug('get_blueprint called', args); const input = GetBlueprintInputSchema.parse(args); const { text, isError } = await executeGetBlueprint(input); return { content: [{ type: 'text', text }], isError }; } );
  • Tool definition object used for MCP registration, providing the tool name, description, and JSON Schema for input validation.
    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 to format the raw API blueprint response into a user-friendly Markdown table showing project details, selected technologies by category, and optional narrative.
    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