Skip to main content
Glama

gateway.tasks_result

Fetch a downstream MCP task result and apply the same secret-redaction and output-truncation options used during invocation.

Instructions

Fetch a downstream MCP task result and apply the same output redaction and truncation options as gateway.invoke.

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": {
      "server_name": "<server_name>",
      "task_id": "<task_id>"
    },
    "name": "gateway.tasks_result"
  }
}

Input Schema

NameRequiredDescriptionDefault
optionsNoOutput redaction and truncation options
task_idYesOpaque downstream task ID
server_nameYesServer that owns the task
requestor_contextNoOpaque requestor context forwarded downstream

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv3.0.1
    • addedInput schema / properties / options / anyOf
      Added value: +[
      +  {
      +    "properties": {
      +      "max_output_chars": {
      +        "anyOf": [
      +          {
      +            "maximum": 100000,
      +            "minimum": 100,
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Output size budget for this call: output is truncated at 4x this many UTF-8 bytes"
      +      },
      +      "redact_secrets": {
      +        "default": false,
      +        "description": "Redact detected secrets from output. Without options, task results are redacted and plain results are not",
      +        "type": "boolean"
      +      },
      +      "timeout_ms": {
      +        "default": 30000,
      +        "description": "Timeout in milliseconds",
      +        "maximum": 300000,
      +        "minimum": 1000,
      +        "type": "integer"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / options / description
      Added value: +"Output redaction and truncation options"
    • removedInput schema / properties / options / properties
      Removed value: -{
      -  "max_output_chars": {
      -    "type": "integer"
      -  },
      -  "redact_secrets": {
      -    "type": "boolean"
      -  }
      -}
    • removedInput schema / properties / options / type
      Removed value: -"object"
    • addedInput schema / properties / requestor_context
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Opaque requestor context forwarded downstream"
      +}
    • addedInput schema / properties / server_name / description
      Added value: +"Server that owns the task"
    • addedInput schema / properties / server_name / minLength
      Added value: +1
    • addedInput schema / properties / task_id / description
      Added value: +"Opaque downstream task ID"
    • addedInput schema / properties / task_id / minLength
      Added value: +1
  2. Addedv1.21.1
  3. Removedv1.20.0
  4. First observedv1.18.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the useful default that task results are redacted while plain results are not, plus the truncation budget semantics. It does not say what happens when the task is still pending (block, error, or partial), whether the fetch is idempotent or whether the result is consumed on read, or how timeout_ms interacts with polling.

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?

A single well-formed sentence with the action front-loaded and no wasted words. It is efficient, though the information density is low for a tool whose behavior has open questions.

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?

For a task-result retrieval tool with four parameters, no annotations, and no output schema, the definition covers the redaction/truncation contract but leaves the lifecycle contract undescribed: pending-task behavior, whether the result is retained or consumed, and its relationship to tasks_get and tasks_cancel are all unstated.

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% and every parameter carries its own description, so the baseline is 3. The description's only added meaning is that the options object mirrors gateway.invoke's output redaction and truncation behavior, which is a modest clarification rather than new parameter-level information.

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?

The description gives a specific verb and resource ("Fetch a downstream MCP task result") and adds a distinguishing behavioral note (it applies the same redaction and truncation options as gateway.invoke). This separates it from siblings like tasks_cancel and tasks_list, but it never explicitly distinguishes itself from gateway.tasks_get, which an agent must resolve from the task_id/result wording alone.

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

Usage Guidelines3/5

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

Usage is only implied: the word "task result" signals it is the retrieval step after a task is submitted, and the reference to gateway.invoke hints that the options behave identically. There is no explicit when-to-use or when-not, no mention of gateway.tasks_get for status/metadata, and no stated precondition such as the task being complete.

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