Skip to main content
Glama

read_workspace_file

Read a file from the workspace or session repository, blocking sensitive files like secrets and keys. In direct mode, scope to the session's repo path and receive a SHA-256 hash.

Instructions

Read a file within the workspace. Sensitive files (secrets, keys, tokens) are blocked. In Direct mode (with session_id), reads are scoped to the session's repo_path and return sha256.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRelative path to a file inside the workspace or session repo
session_idNoOptional Direct session ID. When provided, read scope is limited to the session's repo_path and sha256 is returned.
Behavior4/5

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

The description discloses blocking of sensitive files and the scoping/return of sha256 in Direct mode, which adds behavioral context beyond the lack of annotations. However, it does not cover error handling or authentication requirements, which are minor omissions for a read tool.

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: the first states the primary purpose, and the second adds constraints and mode-specific behavior. No redundancy, front-loaded, and every sentence is informative.

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

Completeness2/5

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

The description fails to explain the return value format (e.g., file content, encoding, or structure). For a tool that reads files, the agent needs to know what to expect in the response, especially since there is no output schema. Mentioning sha256 is insufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, and the description reinforces the path and session_id parameters while adding the crucial detail about sensitive files being blocked. This adds value beyond the schema's descriptions.

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 clearly states the tool reads a file within the workspace, with specific constraints like blocking sensitive files and scoping behavior in Direct mode. The verb 'Read' and resource 'workspace file' are precise, and the additional details distinguish it from siblings.

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?

The description implies usage by specifying Direct mode behavior, but it does not explicitly state when to use this tool versus alternatives like search_workspace or get_diff. No exclusions or alternative recommendations are provided, leaving the agent to infer context.

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

Install Server

Other Tools

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/jiezeng2004-design/PatchWarden'

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