Skip to main content
Glama

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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",
        };
      },
    });
  • Zod schema for tool inputs: empty object (no parameters).
    parameters: z.object({}),
  • 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;
    }

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/exponentlabshq/stacks-clarity-mcp'

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