Skip to main content
Glama

Read a library element

read_element
Read-onlyIdempotent

Read a published element's source and input definitions by id from search_elements. A long source comes a window of lines at a time: the answer says the offset to read on from.

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>",
      "offset": "<offset>",
      "limit": "<limit>",
      "projectId": "<projectId>"
    },
    "name": "read_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
limitYesLines of the source to read. null reads as much as one answer holds; a longer source says the offset to read on from.
offsetYes1-indexed first line of the source to read. null reads from the start.
projectIdYesThe project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / limit
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 9007199254740991,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Lines of the source to read. null reads as much as one answer holds; a longer source says the offset to read on from."
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 9007199254740991,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "1-indexed first line of the source to read. null reads from the start."
      +}
    • changedInput schema / required
      Previous value: -[
      -  "id",
      -  "projectId"
      -]New value: +[
      +  "id",
      +  "offset",
      +  "limit",
      +  "projectId"
      +]
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so the safety profile is carried. The description adds genuinely new behavior: sources are returned as a windowed slice and the answer reports the offset to continue from, which tells the agent to expect and handle pagination.

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, zero filler, with the retrieval source and the paging behavior front-loaded. Every clause earns its place.

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?

For a read-only tool with strong annotations, no output schema, and 4 required params, the description covers the key unknowns an agent needs: where the id comes from and how to continue a truncated source. Only the projectId semantics are left entirely to the schema.

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 coverage is 75% and the property descriptions already explain offset (1-indexed), limit (null reads as much as one answer holds), and projectId in detail. The description reinforces the pagination meaning of offset/limit but adds little on id or projectId beyond the schema, so baseline 3 is right.

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?

Names a specific verb (read) and a specific resource (a published element's source and input definitions), and pins where the id comes from (search_elements). It doesn't explicitly distinguish itself from near-siblings like read_component or read_template, but the scope is clear enough to select the tool.

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?

Establishes the prerequisite that the id is obtained from search_elements, and covers the paging workflow for long sources. It stops short of naming alternatives or exclusions, so it sits at clear-context-no-exclusions rather than full when/when-not guidance.

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.