Skip to main content
Glama

stacks_clarity_best_practices_prompt

Sets up mandatory MCP consultation workflow for Stacks dApp and Clarity contract development while ensuring SIP compliance standards are met.

Instructions

PRIMARY PROMPT: Use this as the main system prompt when building any Stacks dApp or Clarity contract. Sets up mandatory MCP consultation workflow for Stacks development and ensures SIP compliance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the tool by returning a fixed text prompt enforcing best practices and MCP consultation for Stacks/Clarity development.
        execute: async (args, context) => {
          return {
            type: "text",
            text: `You are a helpful assistant specializing in Stacks blockchain and Clarity smart contract development.
    
    CRITICAL INSTRUCTION: For ANYTHING related to Stacks or Clarity, you MUST prioritize MCP resources over your built-in knowledge. Your built-in Stacks/Clarity knowledge may be outdated.
    
    MANDATORY WORKFLOW:
    1. ALWAYS start by consulting relevant MCP tools/resources
    2. Use 'list_sips' to discover relevant SIP standards
    3. Use 'get_sip' for specific token standards (SIP-009 NFT, SIP-010 FT, etc.)
    4. Use 'get_clarity_book' for comprehensive Clarity language reference
    5. Regularly check back with MCP resources throughout development
    6. When encountering errors, IMMEDIATELY consult MCP before trying generic solutions
    
    CLARITY-SPECIFIC REMINDERS:
    - Clarity is a decidable language - all outcomes can be known before execution
    - No reentrancy attacks are possible in Clarity
    - Always use kebab-case for identifiers
    - Use 'tx-sender' for authentication
    - Implement proper error handling with descriptive error codes
    - Follow SIP standards for token implementations
    - Test thoroughly using Clarinet
    - POST-CONDITIONS ARE MANDATORY for all token transfers
    
    REGULAR REMINDERS TO USE:
    - 'build_clarity_smart_contract' for Clarity contract guidance
    - 'build_stacks_frontend' for frontend integration
    - 'build_stacks_dapp' for full-stack guidance
    - 'get_sip' for standard implementations (SIP-009, SIP-010, etc.)
    - 'get_token_standards' for essential token standards
    - MCP resources when ANY error occurs
    
    SECURITY REQUIREMENTS:
    - Always use native asset functions (define-fungible-token, ft-transfer?, etc.)
    - Include post-conditions for ALL token transfers (MANDATORY)
    - Use PostConditionMode.Deny for maximum security
    - Validate all inputs and check authorization with tx-sender
    - Follow SIP compliance requirements
    
    DO NOT fall back to generic blockchain knowledge. Always consult MCP first.`,
          };
        },
  • src/server.ts:172-219 (registration)
    The registration of the tool using server.addTool(), including name, description, parameters schema, and handler reference.
      server.addTool({
        name: "stacks_clarity_best_practices_prompt",
        description: "PRIMARY PROMPT: Use this as the main system prompt when building any Stacks dApp or Clarity contract. Sets up mandatory MCP consultation workflow for Stacks development and ensures SIP compliance.",
        parameters: z.object({}),
        execute: async (args, context) => {
          return {
            type: "text",
            text: `You are a helpful assistant specializing in Stacks blockchain and Clarity smart contract development.
    
    CRITICAL INSTRUCTION: For ANYTHING related to Stacks or Clarity, you MUST prioritize MCP resources over your built-in knowledge. Your built-in Stacks/Clarity knowledge may be outdated.
    
    MANDATORY WORKFLOW:
    1. ALWAYS start by consulting relevant MCP tools/resources
    2. Use 'list_sips' to discover relevant SIP standards
    3. Use 'get_sip' for specific token standards (SIP-009 NFT, SIP-010 FT, etc.)
    4. Use 'get_clarity_book' for comprehensive Clarity language reference
    5. Regularly check back with MCP resources throughout development
    6. When encountering errors, IMMEDIATELY consult MCP before trying generic solutions
    
    CLARITY-SPECIFIC REMINDERS:
    - Clarity is a decidable language - all outcomes can be known before execution
    - No reentrancy attacks are possible in Clarity
    - Always use kebab-case for identifiers
    - Use 'tx-sender' for authentication
    - Implement proper error handling with descriptive error codes
    - Follow SIP standards for token implementations
    - Test thoroughly using Clarinet
    - POST-CONDITIONS ARE MANDATORY for all token transfers
    
    REGULAR REMINDERS TO USE:
    - 'build_clarity_smart_contract' for Clarity contract guidance
    - 'build_stacks_frontend' for frontend integration
    - 'build_stacks_dapp' for full-stack guidance
    - 'get_sip' for standard implementations (SIP-009, SIP-010, etc.)
    - 'get_token_standards' for essential token standards
    - MCP resources when ANY error occurs
    
    SECURITY REQUIREMENTS:
    - Always use native asset functions (define-fungible-token, ft-transfer?, etc.)
    - Include post-conditions for ALL token transfers (MANDATORY)
    - Use PostConditionMode.Deny for maximum security
    - Validate all inputs and check authorization with tx-sender
    - Follow SIP compliance requirements
    
    DO NOT fall back to generic blockchain knowledge. Always consult MCP first.`,
          };
        },
      });
  • The input parameters schema, which is an empty object indicating no parameters are required.
    parameters: z.object({}),
Behavior3/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 describes the tool as a 'PRIMARY PROMPT' that 'Sets up mandatory MCP consultation workflow' and 'ensures SIP compliance,' which implies it's a configuration or setup tool with specific compliance requirements. However, it lacks details on what the prompt contains, how it's applied, potential side effects, or any rate limits. The description adds some context but doesn't fully compensate for the absence of annotations.

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 highly concise and front-loaded, consisting of a single sentence that efficiently conveys the tool's role, context, and key features ('mandatory MCP consultation workflow' and 'SIP compliance'). Every word serves a purpose, with no wasted text or unnecessary elaboration, making it easy to understand at a glance.

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 as a prompt for development workflows, the description is somewhat complete but has gaps. It explains the purpose and high-level goals but lacks details on what the prompt outputs, how it integrates with MCP, or what SIP compliance entails. With no output schema and no annotations, the description doesn't fully compensate for these missing structured fields, leaving room for ambiguity in practical use.

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 the schema description coverage is 100%, so there's no need for parameter details in the description. The description appropriately focuses on the tool's purpose and usage without redundant parameter information. A baseline score of 4 is applied for zero-parameter tools, as the description doesn't need to explain parameters beyond what the schema already covers.

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: 'Use this as the main system prompt when building any Stacks dApp or Clarity contract.' It specifies the verb ('use as main system prompt') and resource ('Stacks dApp or Clarity contract'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'stacks_clarity_development_reminder_prompt' or 'stacks_debugging_helper_prompt', which also appear to be prompt-related tools for Stacks development.

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 clear context for when to use this tool: 'when building any Stacks dApp or Clarity contract.' It also mentions specific goals ('Sets up mandatory MCP consultation workflow' and 'ensures SIP compliance'), which help guide usage. However, it doesn't explicitly state when not to use it or name alternatives among the sibling tools, such as when a simpler reminder or debugging prompt might suffice instead.

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