Skip to main content
Glama

Prompt Fallback (mj_session_summary)

mj_session_summary
Read-only

Handles fallback execution when a session summary is invoked as an MCP tool instead of a prompt, returning structured error details and suggested fixes.

Instructions

Fallback handler for mj_session_summary when invoked as an MCP tool instead of an MCP prompt.

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_session_summary"
  }
}

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.3/5.0
Behavior2/5

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

Annotations declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered, but the description adds nothing beyond that. Critically, it does not explain that the parameters are error-shaped fields (code, error, category, recoverable) or what the fallback emits, which is exactly the context an agent needs here. Nothing contradicts the annotations, so no contradiction flag.

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?

It is a single short sentence with no padding, so it is concise. However, brevity here comes at the cost of substance: the one sentence conveys almost no actionable information, so it does not really earn its place.

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?

With 8 parameters, nested objects, and an unusual error-shaped schema, this definition needed more explanation than most, yet the description supplies none. An output schema exists, so return values need not be described, but the mismatch between the tool's name and its parameters is left entirely unexplained.

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 already documents nearly every parameter and the baseline of 3 applies. The description adds no meaning on top of that, and notably does not explain why a 'session summary' fallback accepts validation/error fields.

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 essentially restates the name and title: it says the tool is a 'fallback handler' for `mj_session_summary` when called as a tool rather than a prompt, but never says what the handler actually does or returns. An agent cannot infer the behavior (apparently emitting an error/guidance payload) from this text, and there is no differentiation from the many sibling tools.

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?

The only usage signal is the implied condition 'invoked as an MCP tool instead of an MCP prompt,' which is a transport detail rather than guidance. There is no statement of when a caller should choose this versus any alternative, no prerequisites, and no note on what a caller should do with the result.

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