build_stacks_frontend
Create frontend interfaces for Stacks decentralized applications with wallet integration, transaction signing, and post-condition handling capabilities.
Instructions
Build a Stacks dApp frontend - returns comprehensive resources for frontend development including wallet integration, transaction signing, and post-condition handling. Use this tool when you need guidance on building frontends for Stacks dApps.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "build_stacks_frontend"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:142-149 (handler)The execute handler for the build_stacks_frontend tool. Reads markdown resources from the frontend directory and returns them as text response.
execute: async () => { const content = await readAllMarkdownFromDirectories(["frontend"]); return { text: content || "No content found in frontend directory.", type: "text", }; }, - src/server.ts:138-150 (registration)Registration of the build_stacks_frontend tool using server.addTool, including name, description, empty input schema, and handler.
server.addTool({ name: "build_stacks_frontend", description: "Build a Stacks dApp frontend - returns comprehensive resources for frontend development including wallet integration, transaction signing, and post-condition handling. Use this tool when you need guidance on building frontends for Stacks dApps.", parameters: z.object({}), execute: async () => { const content = await readAllMarkdownFromDirectories(["frontend"]); return { text: content || "No content found in frontend directory.", type: "text", }; }, }); - src/server.ts:141-141 (schema)Zod schema for tool inputs: empty object (no parameters).
parameters: z.object({}), - src/utils/index.ts:38-56 (helper)Supporting helper function readAllMarkdownFromDirectories that combines markdown content from directories, called by the tool handler with ["frontend"]
/** * Helper function to read all markdown files from multiple directories */ export async function readAllMarkdownFromDirectories( dirNames: string[] ): Promise<string> { let combinedContent = ""; for (const dirName of dirNames) { const dirPath = pathJoin(resourcesDir, dirName); const dirContent = await readAllMarkdownFromDirectory(dirPath); if (dirContent.trim()) { combinedContent += `# ${dirName.toUpperCase()} RESOURCES\n\n`; combinedContent += dirContent; } } return combinedContent; }