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({}),

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