Skip to main content
Glama

Get a Wiro task price

get_task_price
Read-onlyIdempotent

Retrieves the amount charged for a task and its model list price when a discount makes them differ, helping you verify billing when a task result lacks cost details.

Instructions

Get one task’s cost: the amount charged once Wiro has billed it, with the model's list price beside it when a discount made them differ. Successful tasks are billed; failed tasks and tasks cancelled while queued are not, and a task stopped while running can still be charged once its work ends. A finished task's result already shows its cost, so use this for a task whose result you do not have, or whose result shows only the list price. If the task is active, follow the returned wait_for_task next action. Tell a person a task's status as its Status line or task.statusText says it, never the task.status code.

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": "get_task_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskidNoThe task ID (alternative to tasktoken).
tasktokenNoThe task token returned from run_model.

Output Schema

NameRequiredDescriptionDefault
taskYes
stateYes
billedYes
costUsdYesThe amount charged so far; null while the task is active or a successful task's charge is not recorded yet. While billed is null, a later charge is still possible.
nextActionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.0.0
    • addedOutput schema / properties / task / properties / status / description
      Added value: +"The task's status code, such as task_postprocess_end, for programs. Tell a person statusText, never this code."
    • addedOutput schema / properties / task / properties / statusText
      Added value: +{
      +  "description": "The task's status in words, such as Completed, Failed or Running: producing output, as the Status line says it. This is what to tell a person.",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv1.5.3
    • addedOutput schema / properties / nextAction / properties / arguments / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  3. Changed3 schema fields changedv1.4.1
    • addedOutput schema / properties / costUsd / description
      Added value: +"The amount charged so far; null while the task is active or a successful task's charge is not recorded yet. While billed is null, a later charge is still possible."
    • addedOutput schema / properties / task / properties / chargedUsd
      Added value: +{
      +  "description": "What the payer was charged, after any discount.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / task / properties / costUsd / description
      Added value: +"The model's list price for this task."
  4. Changed2 schema fields changedv1.2.3
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  5. Changed3 schema fields changedv1.2.1
    • changedInput schema / properties / taskid / description
      Previous value: -"The task ID (alternative to tasktoken)"New value: +"The task ID (alternative to tasktoken)."
    • changedInput schema / properties / tasktoken / description
      Previous value: -"The task token returned from run_model"New value: +"The task token returned from run_model."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "billed": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "costUsd": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "nextAction": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "arguments": {
      +          "additionalProperties": {},
      +          "type": "object"
      +        },
      +        "reason": {
      +          "type": "string"
      +        },
      +        "tool": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "tool",
      +        "arguments",
      +        "reason"
      +      ],
      +      "type": "object"
      +    },
      +    "state": {
      +      "enum": [
      +        "submitted",
      +        "running",
      +        "completed",
      +        "failed",
      +        "cancelled"
      +      ],
      +      "type": "string"
      +    },
      +    "task": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "costUsd": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "durationSeconds": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "exitCode": {
      +          "type": "string"
      +        },
      +        "id": {
      +          "type": "string"
      +        },
      +        "model": {
      +          "type": "string"
      +        },
      +        "status": {
      +          "type": "string"
      +        },
      +        "token": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "state",
      +    "task",
      +    "billed",
      +    "costUsd"
      +  ],
      +  "type": "object"
      +}
  6. First observedv1.1.4

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds billing semantics that no structured field carries: successful tasks are billed, failed and queued-cancelled tasks are not, and a task stopped while running may still be charged once its work ends. It further warns how to report status to a person (use the Status line or `task.statusText`, never the `task.status` code), which is behavioral guidance the annotations cannot express.

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 cost definition is front-loaded in the first sentence, followed by billing edge cases, then usage guidance, then a follow-up rule. Every sentence carries distinct information and none restates the name or annotations.

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?

An output schema exists, so return values need not be spelled out, and the description still flags the relevant output field (`wait_for_task` next action) plus the status-field pitfall. For a two-parameter read tool with full schema coverage, nothing an agent needs to call it correctly is missing.

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 the schema itself explains that `taskid` is an alternative to `tasktoken` and where `tasktoken` comes from (run_model). The description adds no meaning about either parameter beyond the schema, so the baseline 3 applies.

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 gives a specific verb and resource ("Get one task's cost") and immediately scopes it to the amount charged once Wiro has billed it, with list price shown alongside when a discount applies. It implicitly distinguishes itself from get_task by noting a finished task's result already shows its cost, so an agent can tell the two apart without opening either 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?

It states exactly when to use this tool ("a task whose result you do not have, or whose result shows only the list price") and when not to (a finished task whose result already shows cost). It also routes the agent forward: if the task is active, follow the returned `wait_for_task` next action, naming a concrete sibling for the follow-up case.

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