Skip to main content
Glama

file_get

Fetch a shared file's latest version.

Returns version. Pass it as expected_version on file_update when you edit a shared file. total_chars is the full size in characters.

Omit offset and limit to return the whole file. This result is not compressed: a shortened file is not the file you asked for. For a large file, pass offset and limit (characters, at most 32000) and read it in pieces. A negative offset counts from the end, so the latest section can be read without the rest of the document. truncated is true when content is not the whole file. Includes public_url (the /s/{slug} link) when published.

To add a dated section to a large file, read the tail with a negative offset and call file_append instead of rewriting the whole body.

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_id": "<file_id>"
    },
    "name": "file_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum characters of content to return (1-32000). Omit together with offset to return the whole file. Pass offset and limit to read a large file in pieces. The next page starts at offset + returned_chars.
offsetNoCharacter index into the latest version. 0 is the start. A negative offset counts from the end (offset=-4000 and limit=4000 is the last 4000 characters). Omit together with limit to return the whole file.
file_idYesFile UUID

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / limit
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 32000,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Maximum characters of content to return (1-32000). Omit together with offset to return the whole file. Pass offset and limit to read a large file in pieces. The next page starts at offset + returned_chars."
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Character index into the latest version. 0 is the start. A negative offset counts from the end (offset=-4000 and limit=4000 is the last 4000 characters). Omit together with limit to return the whole file."
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the safety/behavior burden and does well: it warns the result is not compressed, explains total_chars, truncated, version, and public_url, and states the 32000 cap. It stops short of access prerequisites (what 'shared' implies, auth needs) and error behavior for missing or unpublished files.

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?

Front-loads the purpose and the version handoff, then moves to pagination guidance in short paragraphs. A few clauses duplicate schema text (the 32000 limit, negative offset semantics), costing some tightness but not comprehension.

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?

For a three-parameter read tool with an output schema, this covers everything an agent needs to call it correctly: whole-vs-chunked reads, tail reads, truncation detection, and the version round-trip into file_update. Return fields are described where semantics matter without redundant schema repetition.

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?

Schema coverage is 100%, so baseline is 3, but the description adds workflow meaning: chunking with offset+limit, the negative-offset tail read, and the expected_version handoff to file_update. It repeats the 32000 maximum already in the schema, which limits the added value slightly.

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?

Opens with a specific verb and resource plus scope: 'Fetch a shared file's latest version.' The 'latest version' qualifier distinguishes it from version-history siblings, and the body explicitly routes to file_update and file_append for their respective jobs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete when-to-use rules: omit offset/limit for whole files, pass offset+limit (≤32000) to chunk large files, use a negative offset to read the tail, and use file_append rather than rewriting when adding a dated section. Each alternative is named with the condition that selects it.

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.