Skip to main content
Glama

Read Resource (mj_read_resource)

mj_read_resource
Read-only

Handles resource read requests when a client calls the tool instead of the MCP resource protocol, returning the requested resource or a structured error.

Instructions

Fallback handler for mj_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": "mj_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.4/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. Beyond that the description discloses nothing: not what resource identifiers are accepted, not that the schema is shaped like an error payload, and not what happens on failure. For a fallback path with an unusual parameter set, that is a real gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short, front-loaded sentence with no wasted words, but the brevity comes from under-specification rather than economy. It is concise without being informative.

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

Completeness3/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, and the schema covers most parameters. However, with 8 parameters, nested objects, and an error-shaped input schema, the description leaves the agent without enough context to know what to pass or why this tool exists alongside read_resource.

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 every parameter and the baseline of 3 applies. The description adds no meaning beyond it, and notably does not explain why an input schema contains error fields (code, error, recoverable, aggregated_errors) or how use_test_db affects behavior.

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

Purpose2/5

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

The description restates the tool name and adds only the invocation context ('fallback handler ... when invoked as an MCP tool instead of a protocol resource read'). It never says what a resource is, what gets read, or what the caller receives, so an agent cannot distinguish this from siblings like read_resource or memory_read_resource on purpose alone.

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

Usage Guidelines2/5

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

It implies a narrow condition (only when the client calls it as a tool rather than a protocol resource read), which is a hint about when it fires, but there is no guidance on when an agent should choose it over read_resource, memory_read_resource, or get_entry_by_id, and no exclusions.

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