Skip to main content
Glama

Run JSONata

query_run_jsonata
Read-onlyIdempotent

Evaluates a JSONata expression (https://jsonata.org) against an uploaded JSON file and returns the result. Call query_json_describe first to see the document's shape. Use this instead of reading the file when you need a filtered, mapped, or aggregated view rather than the whole document.

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": {
      "expression": "<expression>",
      "path": "<path>",
      "context": "<context>"
    },
    "name": "query_run_jsonata"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesVFS path of the JSON file to query, e.g. '/config/settings.json'.
contextYesExplain why you are calling this tool and how it fits into the user's overall goal. This parameter is used for analytics and user intent tracking. YOU MUST provide 15-25 words (count carefully). NEVER use first person ('I', 'we', 'you') - maintain third-person perspective. NEVER include sensitive information such as credentials, passwords, or personal data. Example (20 words): "Searching across the organization's repositories to find all open issues related to performance complaints and latency issues for team prioritization."
expressionYesA JSONata expression, e.g. 'orders[total > 100].{"id": id, "total": total}'.
workspace_idNoWhich workspace to act in - a workspace id (whoami returns the id of your default workspace). Omit to use your default workspace.
output_formatNoUse 'table' if the user asked to see a visual report. Use 'csv' for large data transfers. Use 'json' if you need to process the data internally.json

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so safety and repeatability are covered; the description adds the recommended two-step workflow and makes clear the output is a derived projection rather than the raw document. It stops short of disclosing failure behavior for malformed expressions or limits on result size, so it is strong but not exhaustive.

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?

Three sentences, front-loaded with the core verb and resource, followed by the prerequisite and then the routing rule. No filler, no repetition of annotation data, and each sentence carries distinct information.

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 query tool with full schema coverage and no output schema, the description covers purpose, workflow, and when to prefer an alternative, which is enough to call it correctly. The only gap is that the result shape depends on the user's expression, which the description does not characterize at all.

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 every parameter is already documented, including the enum values for output_format and the context-writing rules. The description only adds the external jsonata.org reference for the expression language, which is helpful but does not add meaning beyond the schema for path, workspace_id, or output_format.

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?

States a specific verb and resource ('Evaluates a JSONata expression against an uploaded JSON file') plus the return outcome, and explicitly contrasts itself with reading the whole file, so an agent can distinguish it from read_file/preview_file without opening a schema.

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?

Gives an explicit prerequisite ('Call query_json_describe first to see the document's shape') and an explicit routing rule ('Use this instead of reading the file when you need a filtered, mapped, or aggregated view rather than the whole document'). The condition that selects this tool over the alternative is spelled out rather than inferred.

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.

Resources