Skip to main content
Glama

Read Resource (read_resource)

read_resource
Read-only

Handles resource-read requests submitted as MCP tool calls, returning structured error details for validation, connection, or internal failures.

Instructions

Fallback handler for read_resource when invoked as an MCP tool instead of a protocol resource read.

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": "read_resource"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoError code (e.g. VALIDATION_ERROR, INTERNAL_ERROR)
errorNoHuman-readable error message
detailsNoAdditional error context
categoryNoError category (validation, query, connection, internal)
suggestionNoSuggested fix for the error
recoverableNoWhether the error is recoverable
use_test_dbNo
aggregated_errorsNoDetails of individual errors in a multi-step operation

Output Schema

NameRequiredDescriptionDefault
codeNoError code (e.g. VALIDATION_ERROR, INTERNAL_ERROR)
errorNoHuman-readable error message
detailsNoAdditional error context
categoryNoError category (validation, query, connection, internal)
suggestionNoSuggested fix for the error
recoverableNoWhether the error is recoverable
aggregated_errorsNoDetails of individual errors in a multi-step operation

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv9.1.0
    • addedInput schema / additionalProperties
      Added value: +{}
    • addedInput schema / properties
      Added value: +{
      +  "aggregated_errors": {
      +    "description": "Details of individual errors in a multi-step operation",
      +    "items": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "message"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "category": {
      +    "description": "Error category (validation, query, connection, internal)",
      +    "type": "string"
      +  },
      +  "code": {
      +    "description": "Error code (e.g. VALIDATION_ERROR, INTERNAL_ERROR)",
      +    "type": "string"
      +  },
      +  "details": {
      +    "additionalProperties": {},
      +    "description": "Additional error context",
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  "error": {
      +    "description": "Human-readable error message",
      +    "type": "string"
      +  },
      +  "recoverable": {
      +    "description": "Whether the error is recoverable",
      +    "type": "boolean"
      +  },
      +  "suggestion": {
      +    "description": "Suggested fix for the error",
      +    "type": "string"
      +  },
      +  "use_test_db": {
      +    "type": "boolean"
      +  }
      +}
    • addedOutput schema / additionalProperties
      Added value: +{}
    • addedOutput schema / properties / aggregated_errors
      Added value: +{
      +  "description": "Details of individual errors in a multi-step operation",
      +  "items": {
      +    "additionalProperties": {},
      +    "properties": {
      +      "message": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "message"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / category
      Added value: +{
      +  "description": "Error category (validation, query, connection, internal)",
      +  "type": "string"
      +}
    • addedOutput schema / properties / code
      Added value: +{
      +  "description": "Error code (e.g. VALIDATION_ERROR, INTERNAL_ERROR)",
      +  "type": "string"
      +}
    • addedOutput schema / properties / details
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Additional error context",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / error
      Added value: +{
      +  "description": "Human-readable error message",
      +  "type": "string"
      +}
    • addedOutput schema / properties / recoverable
      Added value: +{
      +  "description": "Whether the error is recoverable",
      +  "type": "boolean"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "$schema": "https://json-schema.org/draft/2020-12/schema"
      -}
    • addedOutput schema / properties / suggestion
      Added value: +{
      +  "description": "Suggested fix for the error",
      +  "type": "string"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "result"
      -]
  2. First observedv9.0.0

TDQS

C2.8/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered and the description adds the useful nuance that this is a fallback shim. Beyond that it is silent: it does not explain why the input schema is shaped like an error payload (code, error, recoverable, aggregated_errors) for a 'read' operation, whether parameters are forwarded, or what a successful response looks like. That unresolved mismatch is the main thing an agent needs disclosed.

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?

A single front-loaded sentence with no filler or redundancy. The brevity is efficient, though it borders on under-specification rather than disciplined conciseness.

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

Completeness2/5

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

An output schema exists so return values need not be explained, but for an eight-parameter tool with nested objects and an error-shaped schema, the description leaves the agent unable to determine what inputs to supply or what the call achieves. It explains the invocation path but not the contract.

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 88%, so the schema itself documents nearly all eight parameters and the baseline of 3 applies. The description adds no parameter meaning whatsoever, and notably does not reconcile the error-reporting parameters with a read operation, but it is not penalized below baseline for the schema's own coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description identifies the tool as a fallback handler for `read_resource` used when the tool-invocation path is taken instead of a protocol resource read, which is a real distinguishing trait. However, it never states what the tool actually does functionally (retrieve a resource? by what identifier?) and does not separate it from sibling read tools such as `mj_read_resource` or `memory_read_resource`.

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

Usage Guidelines3/5

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

It implies the invocation context in which the handler fires ('when invoked as an MCP tool instead of a protocol resource read'), which is a form of usage guidance. It gives no agent-facing when-to-use/when-not-to-use direction and names no alternative, so the agent must infer selection from the name alone.

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

Deploy Server

Other Tools