Skip to main content
Glama

drupal_read_file

Read a file from a Drupal project using its site name and relative path, with secret and PII masking; optionally set start and end lines to target a range.

Instructions

Read a file from the Drupal project (with secret/PII masking)

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": {
      "site": "<site>",
      "path": "<path>"
    },
    "name": "drupal_read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile path relative to Drupal root
siteYesDDEV site name
end_lineNoEnd line
start_lineNoStart line

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that output is masked for secrets/PII, which an agent could not infer from the schema, but it omits truncation/size limits, how start_line/end_line interact, and error behavior for missing paths.

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?

A single compact sentence with the key detail (masking) front-loaded alongside the action. It is efficient, though the terseness leaves several behavioral questions unaddressed.

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 four-parameter read tool with no annotations and no output schema, the definition covers the action and the masking behavior but not line-range semantics, output size limits, or failure modes. Adequate but with clear gaps.

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%, documenting site, path, start_line and end_line, so the baseline is 3. The description adds nothing beyond the schema – notably it never explains that the line parameters allow partial reads.

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: 'Read a file from the Drupal project', plus the notable qualifier that secrets/PII are masked. It never distinguishes this from siblings like drupal_search_code or drupal_config_get, so an agent knows what it does but not precisely where it fits.

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 by 'read a file' – there is no explicit statement of when to reach for this versus searching code or fetching config. No prerequisites or exclusions are given.

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