Skip to main content
Glama

validate_api_contracts

Check frontend and backend API contracts to identify endpoint, type, and parameter mismatches before runtime errors occur.

Instructions

Validate API contracts between frontend and backend. Detects mismatches in endpoints, types, and parameters before runtime errors occur.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesAbsolute path to the project root (should contain both frontend and backend)
includeTypesNoValidate type compatibility
includeEndpointsNoValidate endpoint existence and HTTP methods
includeParametersNoValidate request/response parameters

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.4.8

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description must disclose behavior itself; it states the tool detects mismatches, implying a non-mutating static analysis. It does not explicitly confirm that it is read-only, nor does it describe project structure requirements or runtime cost, leaving some ambiguity.

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?

Two sentences, front-loaded with the primary action and followed by a concrete statement of value. No filler or redundant restatement of the tool name.

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?

The description is adequate for a simple read-only validation tool with fully described parameters, but there is no output schema and the description does not state what the tool returns (e.g., a report, status, or errors). Additional context about how this fits with get_validation_results or get_api_contract_report would improve completeness.

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 coverage is 100%, so the schema already documents all four parameters. The description adds semantic value by naming the three validation dimensions that map to includeTypes, includeEndpoints, and includeParameters, but this is just a high-level echo of the schema.

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

Purpose5/5

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

The description uses a specific verb ('validate') and resource ('API contracts between frontend and backend'), and names concrete detection targets (endpoints, types, parameters). This clearly differentiates it from siblings like validate_code (code-level validation) and get_api_contract_report (retrieving a report rather than running validation).

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?

The description provides clear context: use this tool to catch contract mismatches before runtime, which is enough for basic selection. However, it does not mention any alternatives or exclusion criteria, nor how it relates to sibling tools like start_validation or get_api_contract_report, so it stops one step short of full guidance.

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

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/codegoddy/codeguardian_mcp'

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