Skip to main content
Glama

Codebase File Read

codebase_file_read

Read a single file from a local Drupal module using a module-relative path; blocks unsafe paths and truncates content at 64 KB.

Instructions

Read one file from a local module.

path is module-relative (e.g. 'mymod.module'). Content is truncated at 64 KB with a truncated flag. Absolute paths, '..' traversal and symlinks escaping the codebase are rejected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
moduleYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.1

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does well: it discloses the 64 KB truncation limit and the accompanying truncated flag, plus the security rejections (absolute paths, '..' traversal, symlinks escaping the codebase). It does not describe behavior on a missing file, permission failures, or encoding handling, which keeps it short of a 5.

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?

Three short sentences, front-loaded with the operation, then the path convention, then the guardrails. Every sentence earns its place with no filler.

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?

An output schema exists, so return-value explanation is rightly omitted, and the description covers the two non-obvious traits an agent needs (truncation and path safety). The `module` parameter and error behavior remain unaddressed, so it is not fully complete for a two-required-param tool.

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 0%, so the description must compensate. It defines `path` clearly (module-relative, with an example) but says nothing about the `module` parameter beyond the phrase 'from a local module', leaving half the parameters undocumented in both schema and description. Partial compensation only.

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 with scope: 'Read one file from a local module.' The word 'one file' plus 'path is module-relative' implicitly separates it from listing tools such as codebase_files_list and from codebase_function_read, but no sibling is named explicitly, so the differentiation is inferential rather than stated.

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 implied by the module-relative path convention and the 'local module' scoping, but there is no explicit guidance on when to pick this over codebase_search, codebase_files_list, or codebase_function_read, and no stated preconditions. Adequate context, no routing help.

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

Deploy Server

Other Tools