Skip to main content
Glama

Validate Source Map

sourcemap_validate
Read-only

Validate a .map file as a source map and report whether it is valid plus basic structure such as sources, names, and mappings count.

Instructions

Validate that a file is a valid source map. Reports whether the map is valid and its basic structure (sources, names, mappings count).

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": {
      "file": "<file>"
    },
    "name": "sourcemap_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesPath to a source map file (.map)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and closed-world behavior, so the safety profile is covered. The description usefully adds the shape of the success result (validity flag plus sources/names/mappings counts), but says nothing about what happens on a malformed or non-.map file — whether it errors or returns valid=false — which is the key behavior for a validator.

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 short sentences with the action front-loaded and the return shape second. The opening clause slightly restates the tool name, but there is no filler beyond that.

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

Completeness4/5

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

For a one-parameter read-only tool with no output schema, the description covers the purpose and the essentials of the returned structure. The missing piece is failure behavior and differentiation from other structure-reporting siblings.

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% for the single required `file` parameter, so the schema already carries the meaning. The description's phrase "valid source map" reinforces the expected input type but adds no format, encoding, or relative-path guidance beyond the schema.

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?

Names a specific verb and resource ("Validate that a file is a valid source map") and states what is reported back (validity plus sources, names, mappings count). It is reasonably distinct from fetch/extract/lookup siblings, though the overlap with a generic info tool such as sourcemap_info is not addressed.

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

Usage Guidelines3/5

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

Usage is only implied — an agent can infer this is the pre-flight check before extract/lookup operations. There is no explicit when-to-use vs when-not, and no mention of what to do when a sibling like sourcemap_info would also report structure.

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