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

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