Skip to main content
Glama

Read file on webspace

webspace_read_file
Read-only

Read a file inside a webspace as its site user, jailed to the home directory. Text over 256 KB is shortened, keeping the start and the end; base64 reads over that size fail. Use base64 for binary files. Config files can hold database passwords: do not repeat them unless the user asks. For a VPS use vps_read_file.

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": {
      "id": "<id>",
      "path": "<path>"
    },
    "name": "webspace_read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe webspace ID
pathYesPath relative to the webspace's home directory, or absolute under /home/<user>/. The web root is public_html.
encodingNoutf8 (default) for text, base64 for binary files

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true; the description adds substantive behavior beyond that: text over 256 KB is truncated keeping head and tail, base64 reads over that size fail outright, and reads are jailed to the home directory. It also warns that config files may contain database passwords and instructs not to echo them, which is real operational context an agent could not infer.

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?

Four short sentences, front-loaded with the core action and scope, then truncation limits, then encoding, then safety, then the sibling redirect. No sentence is redundant and each carries distinct information.

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

Completeness5/5

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

There is no output schema, yet the description still explains the most important return behavior (truncation shape and size-based failure). Combined with the fully documented schema and the sibling redirect, an agent has everything needed to call this correctly and interpret results.

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 the id, path, and encoding parameters are already fully documented, including the public_html web root and the utf8/base64 enum meaning. The description restates the path jail and base64-for-binary guidance rather than adding new parameter-level meaning, so the baseline of 3 applies.

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?

States a specific verb and resource ("Read a file inside a webspace") and adds the execution context ("as its site user, jailed to the home directory"). It also names the sibling it is not ("For a VPS use vps_read_file"), so an agent can distinguish it from vps_read_file without opening either schema.

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?

Gives clear routing guidance: use this for webspaces, vps_read_file for VPS, and base64 for binary files. It lacks an explicit exclusion for text files or a pointer to webspace_list_files for discovery, but the primary when-to-use decision is stated outright.

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.