Skip to main content
Glama

query_app

Read-only

Run a read-only backend operation on a Charming app and return its result, without editing code. Use this for operations that only read state. For operations that change state, use mutate_app. If you don't know an operation's name or which tool it needs, call get_app — each operation lists its tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYesOperation name, routed to /api/:op inside the app module
app_idYesThe app ID (UUID)
paramsNoOptional JSON params

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesTrue if the operation handler returned a successful envelope. False when the app reported an operation error — distinct from a transport/protocol error.
errorNoSet when ok=false. Always inspect kind before retrying.
valueNoOperation return value when ok=true. Shape depends on the app and op called.
advisoriesNoStructured non-fatal advisories, including authoring issues and unread staff feedback responses. Each advisory.summary is also appended to the text content for the LLM path.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / advisories
      Added value: +{
      +  "description": "Structured non-fatal advisories, including authoring issues and unread staff feedback responses. Each advisory.summary is also appended to the text content for the LLM path.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "data": {
      +        "additionalProperties": {},
      +        "description": "Kind-specific structured payload. Shape varies per advisory kind.",
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "doc_url": {
      +        "description": "Optional docs pointer for this advisory kind.",
      +        "type": "string"
      +      },
      +      "kind": {
      +        "description": "Stable advisory identifier (e.g. \"legacy-bridge\").",
      +        "type": "string"
      +      },
      +      "severity": {
      +        "description": "Severity; omitted advisories are treated as 'info'.",
      +        "enum": [
      +          "info",
      +          "warn"
      +        ],
      +        "type": "string"
      +      },
      +      "summary": {
      +        "description": "Agent-facing summary. Self-sufficient; no extra context required.",
      +        "type": "string"
      +      },
      +      "userSummary": {
      +        "description": "End-user-facing summary. Set when the advisory should render in-app.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "summary"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior3/5

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

The readOnlyHint and destructiveHint annotations already communicate the safe, read-only nature, and the description reinforces this with 'read-only' and 'without editing code.' However, the description does not add much beyond the annotations, such as auth requirements, error behavior, or rate limits.

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?

The description is compact and front-loaded: the core purpose and read-only constraint appear in the first sentence. The following sentences give essential routing guidance without filler or repetition.

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?

With an output schema present, the description does not need to explain return values. The description, annotations, and schema together provide everything an agent needs to select the tool, invoke it, and recover from uncertainty about operation names.

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 100%, so the input schema fully documents app_id, op, and params. The description adds minimal parameter-level meaning beyond saying operations are routed and that get_app lists available operations, which is useful context but not required for parameter understanding.

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 action ('Run a read-only backend operation'), a clear resource ('a Charming app'), and the result ('return its result'). It also explicitly distinguishes itself from mutate_app, making the purpose unmistakable.

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

Usage Guidelines5/5

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

The description gives clear when-to-use guidance: use this tool for read-only state operations. It explicitly names mutate_app for state-changing operations and get_app as the fallback when the operation name or required tool is unknown. This fully covers selection among siblings.

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.