Skip to main content
Glama

check_file_structure

Read-onlyIdempotent

Validates a proposed file path against project structure conventions before creating or moving files, confirming correct directory placement.

Instructions

Validates whether a proposed file path follows the project's file structure conventions. Call this BEFORE creating new files or moving existing files to ensure they are placed in the correct directory.

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": {
      "filePath": "<filePath>",
      "fileType": "<fileType>"
    },
    "name": "check_file_structure"
  }
}

Input Schema

NameRequiredDescriptionDefault
filePathYesThe proposed relative file path to validate (e.g. 'src/components/Button.tsx')
fileTypeYesThe type of file being created (e.g. 'component', 'api-route', 'test', 'utility', 'hook', 'service', 'model')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.7/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 the safety profile is covered. The description adds the ordering constraint (must run before create/move), which is useful context. However, it never says what the validation returns on failure or whether it only advises versus blocks the operation, and there is no output schema to fill that gap.

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, zero filler, with the purpose stated first and the timing constraint second. Every sentence earns its place.

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 validator, the description is adequate to call it correctly, and the safety profile is carried by the annotations. The gap is the outcome: with no output schema, the agent cannot tell whether the result is a boolean, a violation list, or a suggested path, nor what to do when validation fails.

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 (filePath, fileType) are documented with examples in the schema itself, so the baseline is 3. The description adds no extra meaning about path format, relative-vs-absolute expectations, or accepted fileType values beyond what the schema already says.

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 gives a specific verb (validates) and a specific resource (a proposed file path against the project's file structure conventions), which is clearly distinct from the verify_* and health_check siblings. It stops short of explicitly naming a sibling or exclusion, so it lands just below the top mark.

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?

States a concrete usage trigger: call BEFORE creating new files or moving existing files, which tells the agent exactly where in the workflow this belongs. There is no explicit when-not guidance or named alternative, so it is not a 5.

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