Skip to main content
Glama

stacks_debugging_helper_prompt

Resolve Stacks/Clarity smart contract errors and debugging loops by redirecting to MCP-first debugging approaches instead of generic blockchain solutions.

Instructions

ERROR RECOVERY PROMPT: Use this immediately when encountering Stacks/Clarity errors, stuck in debugging loops, or when about to try generic blockchain solutions. Redirects to MCP-first debugging approach.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The execute handler function that returns a static text prompt for Stacks/Clarity debugging, emphasizing MCP tool usage and Stacks-specific best practices.
        execute: async (args, context) => {
          return {
            type: "text",
            text: `STACKS DEBUGGING HELPER
    
    You seem to be encountering issues with Stacks/Clarity development.
    
    STOP - Before trying generic solutions:
    
    REQUIRED FIRST STEPS:
    1. Check MCP resources first:
       - Use 'list_sips' to discover relevant SIP standards
       - Use 'get_sip' for specific token standards or functionality
       - Use 'get_clarity_book' for comprehensive Clarity language reference
    
    2. For specific areas, use targeted MCP tools:
       - Smart contracts: 'build_clarity_smart_contract'
       - Frontend issues: 'build_stacks_frontend'
       - Full-stack problems: 'build_stacks_dapp'
       - Token issues: 'get_sip010_info' or 'get_sip009_token_info'
       - Security issues: 'analyze_transaction_post_conditions'
       - Performance issues: 'analyze_contract_performance'
    
    3. Common Stacks-specific debugging steps:
       - POST-CONDITIONS: Check if mandatory post-conditions are missing
       - SIP COMPLIANCE: Verify contract follows SIP-009/SIP-010 standards
       - AUTHORIZATION: Ensure proper tx-sender checks
       - NATIVE FUNCTIONS: Use ft-transfer?, nft-transfer? functions
       - CLARITY SYNTAX: Consult Clarity Book for language-specific patterns
    
    DO NOT:
    - Try generic blockchain solutions without checking Stacks specifics
    - Skip mandatory post-conditions for token transfers
    - Use custom asset tracking instead of native functions
    - Ignore SIP standards for token implementations
    - Assume Ethereum or other blockchain patterns work in Clarity
    
    ALWAYS:
    - Consult MCP tools first for Stacks-specific guidance
    - Use PostConditionMode.Deny for maximum security
    - Follow SIP compliance requirements
    - Leverage SIP-012 performance improvements
    - Check if issue is related to missing post-conditions
    
    CRITICAL STACKS REQUIREMENTS:
    - POST-CONDITIONS ARE MANDATORY for all token transfers
    - Use native asset functions (ft-transfer?, nft-transfer?)
    - Follow SIP-009 (NFT) and SIP-010 (FT) standards
    - Implement proper authorization with tx-sender
    - Leverage Clarity's decidable language benefits`,
          };
        },
  • src/server.ts:273-329 (registration)
    Registration of the stacks_debugging_helper_prompt tool using server.addTool, including inline schema (empty params) and handler.
      server.addTool({
        name: "stacks_debugging_helper_prompt",
        description: "ERROR RECOVERY PROMPT: Use this immediately when encountering Stacks/Clarity errors, stuck in debugging loops, or when about to try generic blockchain solutions. Redirects to MCP-first debugging approach.",
        parameters: z.object({}),
        execute: async (args, context) => {
          return {
            type: "text",
            text: `STACKS DEBUGGING HELPER
    
    You seem to be encountering issues with Stacks/Clarity development.
    
    STOP - Before trying generic solutions:
    
    REQUIRED FIRST STEPS:
    1. Check MCP resources first:
       - Use 'list_sips' to discover relevant SIP standards
       - Use 'get_sip' for specific token standards or functionality
       - Use 'get_clarity_book' for comprehensive Clarity language reference
    
    2. For specific areas, use targeted MCP tools:
       - Smart contracts: 'build_clarity_smart_contract'
       - Frontend issues: 'build_stacks_frontend'
       - Full-stack problems: 'build_stacks_dapp'
       - Token issues: 'get_sip010_info' or 'get_sip009_token_info'
       - Security issues: 'analyze_transaction_post_conditions'
       - Performance issues: 'analyze_contract_performance'
    
    3. Common Stacks-specific debugging steps:
       - POST-CONDITIONS: Check if mandatory post-conditions are missing
       - SIP COMPLIANCE: Verify contract follows SIP-009/SIP-010 standards
       - AUTHORIZATION: Ensure proper tx-sender checks
       - NATIVE FUNCTIONS: Use ft-transfer?, nft-transfer? functions
       - CLARITY SYNTAX: Consult Clarity Book for language-specific patterns
    
    DO NOT:
    - Try generic blockchain solutions without checking Stacks specifics
    - Skip mandatory post-conditions for token transfers
    - Use custom asset tracking instead of native functions
    - Ignore SIP standards for token implementations
    - Assume Ethereum or other blockchain patterns work in Clarity
    
    ALWAYS:
    - Consult MCP tools first for Stacks-specific guidance
    - Use PostConditionMode.Deny for maximum security
    - Follow SIP compliance requirements
    - Leverage SIP-012 performance improvements
    - Check if issue is related to missing post-conditions
    
    CRITICAL STACKS REQUIREMENTS:
    - POST-CONDITIONS ARE MANDATORY for all token transfers
    - Use native asset functions (ft-transfer?, nft-transfer?)
    - Follow SIP-009 (NFT) and SIP-010 (FT) standards
    - Implement proper authorization with tx-sender
    - Leverage Clarity's decidable language benefits`,
          };
        },
      });
  • Input schema defined with Zod as an empty object (no parameters required).
    parameters: z.object({}),
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool 'Redirects to MCP-first debugging approach,' implying it might trigger a process or provide guidance, but it does not clarify what this entails—such as whether it modifies state, requires authentication, has rate limits, or what output to expect. This leaves significant gaps in understanding the tool's behavior.

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 front-loaded with key information in a single, efficient sentence. It wastes no words, clearly stating the tool's trigger conditions and action, making it easy to scan and understand quickly.

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 the tool's complexity (0 parameters, no output schema, no annotations), the description is minimally complete. It explains the purpose and usage context but lacks details on behavioral traits like what the 'MCP-first debugging approach' involves or expected outcomes. This is adequate for a simple prompt tool but could be more informative.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description does not mention parameters, which is appropriate. A baseline of 4 is applied as it adequately handles the lack of parameters without introducing confusion.

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

Purpose4/5

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

The description clearly states the tool's purpose as an 'ERROR RECOVERY PROMPT' for 'Stacks/Clarity errors, stuck in debugging loops, or when about to try generic blockchain solutions,' with a specific action to 'Redirects to MCP-first debugging approach.' It distinguishes itself from siblings by focusing on error recovery rather than analysis, building, or querying, though it doesn't explicitly name alternatives.

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

Usage Guidelines4/5

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

The description provides explicit context for when to use the tool ('immediately when encountering Stacks/Clarity errors, stuck in debugging loops, or when about to try generic blockchain solutions'), which helps differentiate it from siblings like 'analyze_contract_performance' or 'build_clarity_smart_contract.' However, it does not specify when not to use it or name exact alternatives, leaving some ambiguity.

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