Skip to main content
Glama

Read a shared code module

r3_module_read
Read-onlyIdempotent

Read one shared code module: its code, its version (the baseVersion r3_module_write needs), the latest version, its notes, and how many of this account's projects use it. Your own module by name; someone else's PUBLIC module by moduleId. version reads an older version.

A long module is read in PAGES (at most 60000 characters each): every answer gives totalChars, the sha256 of the WHOLE code, and truncated / nextOffset. When truncated is true you have only part of it: read on with the same name, the version answered and offset = nextOffset, join the pages, and check the sha256 before you write it back (half a module written back deletes the rest).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "r3_module_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoYour module's name, e.g. "ship-core".
lengthNoHow many characters to read at most (default and maximum 60000; 8000 in an R3 Builder session). A page ends on a whole line when it can.
offsetNoWhere to start reading, in characters (default 0). For the next page pass the nextOffset of the previous answer.
versionNoA version to read (default: the latest). Pass it when reading the next page.
moduleIdNoInstead of name: a module id (someone else's public module).

Output Schema

NameRequiredDescriptionDefault
codeYes
nameYes
notesYes
ownerYes
yoursYes
answerYesThis answer in words: what was done, what R3 measured, decided or refused, and what to do next. The same text as the result's text block. Read it: the fields beside it are the data, this is the guidance.
lengthYes
offsetYes
sha256Yes
versionYes
isPublicYes
moduleIdYes
createdAtYes
createdByYes
truncatedYes
nextOffsetYes
totalCharsYes
descriptionYes
latestVersionYes
usedInProjectsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • addedInput schema / properties / length
      Added value: +{
      +  "description": "How many characters to read at most (default and maximum 60000; 8000 in an R3 Builder session). A page ends on a whole line when it can.",
      +  "exclusiveMinimum": 0,
      +  "maximum": 60000,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Where to start reading, in characters (default 0). For the next page pass the nextOffset of the previous answer.",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedInput schema / properties / version / description
      Previous value: -"A version to read (default: the latest)."New value: +"A version to read (default: the latest). Pass it when reading the next page."
    • addedOutput schema / properties / length
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / nextOffset
      Added value: +{
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / offset
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / sha256
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / totalChars
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "moduleId",
      -  "name",
      -  "description",
      -  "version",
      -  "latestVersion",
      -  "code",
      -  "notes",
      -  "createdBy",
      -  "createdAt",
      -  "isPublic",
      -  "yours",
      -  "owner",
      -  "usedInProjects",
      -  "answer"
      -]New value: +[
      +  "moduleId",
      +  "name",
      +  "description",
      +  "version",
      +  "latestVersion",
      +  "code",
      +  "offset",
      +  "length",
      +  "totalChars",
      +  "sha256",
      +  "truncated",
      +  "nextOffset",
      +  "notes",
      +  "createdBy",
      +  "createdAt",
      +  "isPublic",
      +  "yours",
      +  "owner",
      +  "usedInProjects",
      +  "answer"
      +]
  2. Added

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is supplied by structured data rather than the prose. The description does add real value beyond that, disclosing that long modules come back in pages of at most 60000 characters with totalChars, a sha256 over the WHOLE code, and truncated/nextOffset, plus the warning that writing back a partial module deletes the rest. The gap keeping this at 3 is that the pagination contract is described in general terms while format details of individual returned fields are left to the output schema.

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?

Two tight paragraphs with the return inventory front-loaded and the pagination warning placed where it matters, right before an agent would act on a partial read. A few clauses are dense (the parenthetical about r3_module_write's baseVersion), and the second paragraph could be split for scanability, but no sentence is filler.

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 paginated read tool with five optional parameters and an output schema, the description covers the access paths, the pagination loop, and the destructive consequence of misusing partial results. An agent has everything needed to call it correctly and continue a multi-page read, even though it needn't restate return-field structure.

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 the baseline would be 3, but the description goes beyond the per-field text by explaining the cross-parameter recipe: read on with the same name, the version that was answered, and offset = nextOffset. That linkage is not expressible in the schema. It doesn't separately explain moduleId versus name precedence (which wins if both are supplied), so it stops short of 5.

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 states a specific verb and resource ('Read one shared code module') and enumerates exactly what comes back: code, version, latest version, notes, and project usage count. That enumeration plus the name/moduleId split distinguishes it from r3_code_read and r3_module_list, so an agent can pick it without opening the 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?

It gives concrete routing rules for the two access paths ('Your own module by name; someone else's PUBLIC module by moduleId') and explains when to pass version ('version reads an older version'), plus a forward reference to r3_module_write's baseVersion need. What's missing is any comparison to the neighboring discovery tools (r3_module_list, r3_module_usage) or an explicit when-not-to-use, so it falls short of a 5.

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.

Resources