Skip to main content
Glama

get_clarity_book

Access comprehensive Clarity language documentation covering all language features, syntax, and best practices for Stacks blockchain development.

Instructions

Get the complete Clarity Book - comprehensive Clarity language documentation covering all language features, syntax, and best practices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that reads the Clarity Book content from stacks-clarity-standards/clarity_book.txt and returns it as a string, with error handling.
    export const getClarityBook = async (): Promise<string> => {
      try {
        const bookPath = pathJoin(stacksClarityStandardsDir, "clarity_book.txt");
        if (!fs.existsSync(bookPath)) {
          return "Clarity Book not found at clarity_book.txt";
        }
        return await readFile(bookPath, "utf-8");
      } catch (error) {
        return `Error reading Clarity Book: ${error}`;
      }
    };
  • src/server.ts:78-86 (registration)
    Tool registration in MCP server, including name, description, input schema (empty object), and execute handler that invokes getClarityBook and formats response.
    server.addTool({
      name: "get_clarity_book",
      description: "Get the complete Clarity Book - comprehensive Clarity language documentation covering all language features, syntax, and best practices.",
      parameters: z.object({}),
      execute: async () => {
        const book = await getClarityBook();
        return { text: book, type: "text" };
      },
    });
  • Zod schema definition for tool inputs: empty object (no parameters required).
    parameters: z.object({}),
  • src/server.ts:7-16 (registration)
    Import statement bringing getClarityBook handler into server.ts for use in tool registration.
    import {
      readAllMarkdownFromDirectories,
      readMarkdownFromDirectory,
      getAvailableSIPs,
      getSIPContent,
      searchSIPs,
      getClarityBook,
      getSIPsWithClarityCode,
      getTokenStandardSIPs,
    } from "./utils/index.js";
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It describes what content is returned but doesn't mention important behavioral aspects like whether this is a read-only operation, if there are rate limits, how current the documentation is, or what format the documentation comes in. The description is minimal about operational characteristics.

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 extremely concise - a single sentence that efficiently communicates the tool's purpose. Every word earns its place: 'Get' (action), 'complete Clarity Book' (resource), 'comprehensive Clarity language documentation' (content type), and 'covering all language features, syntax, and best practices' (scope). No wasted words or redundancy.

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 this is a parameterless documentation retrieval tool with no output schema, the description is adequate but could be more complete. It explains what content is returned but not the format (HTML, PDF, structured data?), size considerations, or how current the documentation is. For a tool that presumably returns substantial documentation, more operational context would be helpful.

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%. The description appropriately doesn't discuss parameters since none exist. It focuses on what the tool returns rather than inputs, which is correct for a parameterless tool. The baseline for 0 parameters with high schema coverage is 4.

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: 'Get the complete Clarity Book' with specific details about what it contains ('comprehensive Clarity language documentation covering all language features, syntax, and best practices'). It uses a specific verb ('Get') and resource ('Clarity Book'), but doesn't explicitly differentiate from sibling tools like 'get_sip' or 'list_sips' which might also retrieve documentation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when this comprehensive documentation retrieval is preferred over more specific tools like 'get_sip' for individual SIPs or 'search_sips' for targeted searches. There's no context about prerequisites or limitations.

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