Skip to main content
Glama

open_patterns

Retrieve personalized coding patterns by name to maintain consistent development styles and conventions across projects.

Instructions

Open specific patterns by their names

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namesYesAn array of pattern names to retrieve

Implementation Reference

  • The openPatterns method in PatternsManager class - the core handler that loads the database and filters patterns by name to return matching patterns.
    async openPatterns(names: string[]): Promise<PatternsDatabase> {
      const database = await this.loadDatabase();
      
      const filteredPatterns = database.patterns.filter(p => names.includes(p.name));
    
      return { patterns: filteredPatterns };
    }
  • Tool registration schema defining 'open_patterns' with its inputSchema specifying a required 'names' array parameter for pattern names to retrieve.
      name: "open_patterns",
      description: "Open specific patterns by their names",
      inputSchema: {
        type: "object",
        properties: {
          names: {
            type: "array",
            items: { type: "string" },
            description: "An array of pattern names to retrieve",
          },
        },
        required: ["names"],
      },
    },
  • src/index.ts:321-322 (registration)
    Switch case handler that routes 'open_patterns' tool calls to the patternsManager.openPatterns method with the names argument.
    case "open_patterns":
      return { content: [{ type: "text", text: JSON.stringify(await patternsManager.openPatterns(args.names as string[]), null, 2) }] };
  • Type definitions for Pattern and PatternsDatabase interfaces that define the data structure used by the open_patterns tool.
    interface Pattern {
      name: string;
      category: string;
      description: string;
      use_cases: string[];
      technologies: string[];
      code_examples: { [language: string]: string };
    }
    
    interface PatternsDatabase {
      patterns: Pattern[];
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It implies a retrieval or access operation ('open'), but doesn't disclose behavioral traits such as required permissions, whether it's read-only or mutative, error handling, or output format. This leaves critical gaps for safe and effective use.

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, efficient sentence with zero waste. It is appropriately sized and front-loaded, directly stating the tool's action without unnecessary elaboration, making it easy to parse quickly.

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 no annotations and no output schema, the description is incomplete for a tool with one required parameter. It fails to explain what 'open' entails operationally, what is returned, or how it differs from siblings, leaving the agent with insufficient context for reliable invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'names' documented as 'An array of pattern names to retrieve'. The description adds minimal value beyond this, merely restating 'by their names' without clarifying syntax, constraints, or usage examples. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Open specific patterns by their names' states a verb ('open') and resource ('patterns'), but is vague about what 'open' means operationally. It doesn't distinguish from siblings like 'read_patterns' or 'search_patterns', leaving ambiguity about whether this retrieves, displays, or activates patterns.

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. With siblings like 'read_patterns' and 'search_patterns' available, the description lacks explicit context, prerequisites, or exclusions, offering only a basic directive without comparative utility.

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