Skip to main content
Glama

verify_code_pattern

Read-onlyIdempotent

Validates a proposed coding approach against project-approved patterns before implementation, helping developers choose correct libraries and architecture for a given scope.

Instructions

Checks whether a proposed code approach follows the project's approved patterns. Call this BEFORE implementing a feature to verify you are using the correct patterns, libraries, and architectural approaches for the given scope.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "approach": "<approach>",
      "scope": "<scope>"
    },
    "name": "verify_code_pattern"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeYesWhich part of the codebase this applies to (e.g. 'frontend/state', 'api/auth', 'database')
approachYesDescription of the coding approach being proposed (e.g. 'Using useState to manage form state in a multi-step wizard')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so safety and side-effect profile are covered structurally. The description adds genuine context beyond that: this is a pre-implementation gate rather than a post-hoc audit. It stops short of saying what a negative result looks like or whether the check is advisory or blocking.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences with the core purpose front-loaded and the usage instruction immediately after. Nothing is wasted, though the trailing clause 'for the given scope' restates what the scope parameter already conveys.

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?

For a simple two-parameter read-only check, the description covers what it does and when to call it. With no output schema, however, an agent gets no signal about what the response contains — a boolean verdict, a list of violations, or suggested corrections — which is the main remaining gap.

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%, and both parameters carry examples ('frontend/state', 'Using useState to manage form state in a multi-step wizard'), so the schema does the heavy lifting. The description adds no further meaning about granularity, accepted scope format, or what makes a good 'approach' string; baseline 3 applies.

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?

States a specific verb and resource: 'Checks whether a proposed code approach follows the project's approved patterns.' The scope is concrete enough to separate it from siblings like verify_dependency_addition or check_file_structure, though it never names those siblings explicitly.

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?

Gives explicit timing guidance: 'Call this BEFORE implementing a feature,' which tells the agent exactly where in the workflow the tool belongs. It does not name alternatives or state when-not to call it (e.g. for a dependency addition, where verify_dependency_addition would be the better fit).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.