Skip to main content
Glama

Workspace read file

workspace_read_file
Destructive

Read a single file from a source repository via an ephemeral AI workspace on the organisation's staging cluster. Shallow-clones the repo and returns the file contents (bounded). Safe in ask mode: the sandbox job is throwaway and cannot modify existing infrastructure. Requires a configured staging cluster plus either application_id or repository ('owner/name' - an Application-linked repository or one of the cluster's tagged context repositories).

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_path": "<file_path>"
    },
    "name": "workspace_read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
branchNoOptional branch to clone. Defaults to the context tag's branch, the Application's configured branch, or the repository's default branch.
file_pathYesPath to the file, relative to the repository root.
repositoryNoRepository to clone in 'owner/name' form. Must be an Application-linked repository or one of the cluster's tagged context repositories; anything else is rejected with the allowed list.
application_idNoThe Application whose linked repository to clone and read from. Provide this or 'repository'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Beyond the annotations it discloses the mechanism (shallow clone into a throwaway sandbox job), the safety posture in ask mode, the bounded return, and the auth/configuration prerequisites. There is mild tension with destructiveHint=true since the text stresses the job "cannot modify existing infrastructure", but that reads as explaining why the write-capable sandbox job is harmless rather than contradicting the hint. What remains undisclosed is what "bounded" actually means in terms of truncation.

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?

Three sentences, front-loaded with the action, then safety, then prerequisites — no filler or marketing language. It is dense but each clause carries operational meaning; the parenthetical 'owner/name' reminder is the only mildly redundant element.

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?

With no output schema, the description does address return values ("returns the file contents (bounded)") and covers prerequisites and sandbox behavior, which is most of what an agent needs. The undefined word "bounded" is the main completeness gap, since truncation limits are exactly what an agent would need to know before relying on the content.

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%, so all four parameters are already documented, including the either/or relationship between application_id and repository and the allowed-repository rule. The description restates the same one-of constraint and adds no branch-selection or path-format detail beyond the schema, so it meets the baseline rather than exceeding it.

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 names a specific verb and resource ("Read a single file from a source repository") plus the mechanism (an ephemeral AI workspace on the staging cluster), which is far more than the title restates. It does not explicitly name a sibling such as github_read_file, so the agent must infer the difference from the staging-cluster/Application framing.

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?

It gives concrete preconditions for use (a configured staging cluster, plus either application_id or repository, with the allowed repository classes spelled out) and states the ask-mode safety condition. What it lacks is an explicit when-to-prefer-this-over alternative, e.g. when to use github_read_file instead of spinning up a sandbox clone.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.