Skip to main content
Glama

get_sip

Retrieve complete Stacks Improvement Proposal content by number, including Clarity smart contract code for blockchain development standards.

Instructions

Get the complete content of a specific SIP (Stacks Improvement Proposal) by number, including any Clarity smart contract code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sipNumberYesThe SIP number (e.g., '009' for SIP-009 NFT standard, '010' for SIP-010 FT standard)

Implementation Reference

  • The execute function that implements the core logic of the 'get_sip' tool by calling the getSIPContent helper with the sipNumber argument and formatting the response.
    execute: async (args) => {
      const content = await getSIPContent(args.sipNumber);
      return { text: content, type: "text" };
    },
  • Zod input schema defining the required 'sipNumber' parameter as a string.
    parameters: z.object({
      sipNumber: z.string().describe("The SIP number (e.g., '009' for SIP-009 NFT standard, '010' for SIP-010 FT standard)"),
    }),
  • src/server.ts:66-76 (registration)
    Registration of the 'get_sip' tool on the FastMCP server using server.addTool method.
    server.addTool({
      name: "get_sip",
      description: "Get the complete content of a specific SIP (Stacks Improvement Proposal) by number, including any Clarity smart contract code.",
      parameters: z.object({
        sipNumber: z.string().describe("The SIP number (e.g., '009' for SIP-009 NFT standard, '010' for SIP-010 FT standard)"),
      }),
      execute: async (args) => {
        const content = await getSIPContent(args.sipNumber);
        return { text: content, type: "text" };
      },
    });
  • Core helper function that reads and formats the content from the SIP directory, including markdown docs and Clarity contract files.
    export const getSIPContent = async (sipNumber: string): Promise<string> => {
      try {
        const sipDir = pathJoin(stacksClarityStandardsDir, `sip-${sipNumber.padStart(3, "0")}`);
        
        if (!fs.existsSync(sipDir)) {
          return `SIP-${sipNumber} directory not found`;
        }
        
        const files = fs.readdirSync(sipDir);
        const mdFiles = files.filter((file) => file.endsWith(".md"));
        const clarFiles = files.filter((file) => file.endsWith(".clar"));
        
        if (mdFiles.length === 0 && clarFiles.length === 0) {
          return `No documentation or Clarity files found for SIP-${sipNumber}`;
        }
        
        let content = `# SIP-${sipNumber.padStart(3, "0")}\n\n`;
        
        // Read markdown documentation first
        for (const file of mdFiles) {
          const filePath = pathJoin(sipDir, file);
          const fileContent = await readFile(filePath, "utf-8");
          content += `## ${file}\n\n${fileContent}\n\n---\n\n`;
        }
        
        // Read Clarity contract files
        for (const file of clarFiles) {
          const filePath = pathJoin(sipDir, file);
          const fileContent = await readFile(filePath, "utf-8");
          content += `## Clarity Contract: ${file}\n\n\`\`\`clarity\n${fileContent}\n\`\`\`\n\n---\n\n`;
        }
        
        return content;
      } catch (error) {
        return `Error reading SIP-${sipNumber}: ${error}`;
      }
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions 'complete content' and 'including any Clarity smart contract code', which adds some behavioral context about what's returned. However, it doesn't disclose critical details like response format, error handling, rate limits, or authentication needs, leaving significant gaps for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. Every word earns its place, with no redundant or vague phrasing, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 1 parameter with full schema coverage and no output schema, the description adequately covers the basic purpose. However, as a read operation with no annotations, it lacks details on return format, error cases, or behavioral constraints, making it minimally complete but with clear gaps for practical use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'sipNumber' well-documented in the schema. The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get the complete content'), resource ('a specific SIP'), and scope ('including any Clarity smart contract code'). It distinguishes from siblings like 'list_sips' (which lists) and 'search_sips' (which searches), making the purpose unambiguous and well-differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when you need full SIP content by number, but doesn't explicitly state when to use this vs. alternatives like 'list_sips' or 'search_sips'. No exclusions or prerequisites are mentioned, leaving some ambiguity about optimal use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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