Skip to main content
Glama
GethosTheWalrus

Temporal MCP Server

query_workflow

Retrieve the current state of a running Temporal workflow by executing a named query with optional JSON arguments.

Instructions

Query a running workflow for its current state

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoArguments for the query (as JSON object)
namespaceNoTemporal namespace for this operation; omit to use the server default
query_nameYesThe name of the query to execute
workflow_idYesThe workflow execution ID to query

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.10.1
    • addedInput schema / properties / namespace
      Added value: +{
      +  "description": "Temporal namespace for this operation; omit to use the server default",
      +  "enum": [
      +    "default"
      +  ],
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Addedv1.9.0
  3. Removedv1.5.0
  4. First observedv1.3.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It implies a read of a running workflow's state but omits key behavioral details: whether it blocks, what happens if the workflow is not running, error handling, or whether it is read-only. Only the 'running workflow' constraint is 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?

The description is a single, front-loaded sentence with no waste. It is appropriately concise, though arguably too terse for a complex operation, which prevents a perfect score.

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?

The tool involves a workflow query with nested arguments and no output schema. The description fails to explain return values, query semantics (e.g., built-in queries), or how to structure the args object, leaving significant gaps for an AI agent to invoke it correctly.

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 coverage is 100%, so each parameter is documented in the schema. The description adds no additional meaning beyond what the schema provides, so the baseline of 3 applies.

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

Purpose4/5

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

States a specific verb ('Query') and resource ('a running workflow'), and clarifies the scope as 'current state'. However, it does not explicitly differentiate from siblings like get_workflow_result or describe_workflow, so it falls short of a 5.

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?

No guidance on when to use this tool versus alternatives (e.g., get_workflow_result for final results, describe_workflow for metadata). The description provides no context or exclusions.

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