Skip to main content
Glama

Get margin task status

perps_get_margin_task_status
Read-onlyIdempotent

Read-only. Poll the status of an add/remove-margin task. Margin add/remove returns a task_id; call this with that task_id to see whether it is pending, processing, completed, or failed.

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": {
      "contractId": "<contractId>",
      "taskId": "<taskId>"
    },
    "name": "perps_get_margin_task_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskIdYestask_id returned by a margin add/remove execution.
contractIdYesNumeric contract id from perps_list_contracts whose margin task to check. 0 is a real contract id, not a placeholder for "unset".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover readOnly, idempotent and non-destructive, so the description doesn't need to; it adds the genuinely new information that this is a polling endpoint whose result is one of pending/processing/completed/failed. It omits polling cadence, whether task state is retained after completion, and what a failed task returns, which keeps it short of a 5.

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?

Three short sentences, front-loaded with the operation and immediately followed by the workflow hook. The leading 'Read-only.' duplicates readOnlyHint and is the only wasteful element.

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 two-parameter, no-output-schema polling tool, the description supplies the key missing piece: the set of terminal and non-terminal states an agent must branch on. A line about how often to poll or what to do on failure would close the remaining gap.

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% and the schema itself documents both taskId and the contractId caveat (0 being a real id). The description only restates the task_id linkage, adding no syntax, format, or validity semantics beyond the schema.

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 (poll the status of an add/remove-margin task) and ties it to the workflow that produces the task_id, so an agent can place it precisely among the prepare_margin_add/remove siblings.

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

Usage Guidelines4/5

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

Gives an explicit trigger: call this after margin add/remove returns a task_id, passing that id. There is no when-not guidance (e.g., no mention of what to do if the task_id is stale or expired), but the entry condition is unambiguous.

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