Skip to main content
Glama

read_patterns

Retrieve stored coding patterns from the MCPatterns database to maintain consistent development styles and conventions across projects.

Instructions

Read all patterns from the database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The readPatterns() method that implements the tool logic - loads and returns the entire patterns database
    async readPatterns(): Promise<PatternsDatabase> {
      return this.loadDatabase();
    }
  • Type definitions for Pattern and PatternsDatabase interfaces that define the structure of pattern data
    // We are storing coding patterns with their metadata and code examples
    interface Pattern {
      name: string;
      category: string;
      description: string;
      use_cases: string[];
      technologies: string[];
      code_examples: { [language: string]: string };
    }
    
    interface PatternsDatabase {
      patterns: Pattern[];
    }
  • src/index.ts:262-268 (registration)
    Tool registration defining 'read_patterns' with its name, description, and empty input schema
      name: "read_patterns",
      description: "Read all patterns from the database",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Request handler case statement that invokes readPatterns() and returns the result as JSON
    case "read_patterns":
      return { content: [{ type: "text", text: JSON.stringify(await patternsManager.readPatterns(), null, 2) }] };
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states a read operation but doesn't clarify aspects like whether it returns all patterns at once, uses pagination, requires specific permissions, or has rate limits. This leaves significant gaps in understanding how the tool behaves beyond its basic function.

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 a single, clear sentence with no wasted words, making it highly efficient and easy to parse. It front-loads the essential information without unnecessary elaboration, which is ideal for a simple tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a read operation. It doesn't specify what 'all patterns' entails (e.g., format, scope, or limitations), leaving the agent uncertain about the tool's full context and behavior. This is inadequate for a tool that might return complex data.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is acceptable in this case, as there are no parameters to explain. This meets the baseline for tools with no parameters.

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 action ('Read') and resource ('patterns from the database'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'search_patterns' or 'open_patterns', which might offer similar functionality with different scopes or methods.

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?

No guidance is provided on when to use this tool versus alternatives such as 'search_patterns' or 'open_patterns'. The description lacks context about prerequisites, ideal scenarios, or exclusions, leaving the agent to infer usage based on the tool name alone.

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/nicholasrubright/MCPatterns'

If you have feedback or need assistance with the MCP directory API, please join our Discord server