Skip to main content
Glama
FortiManager MCP Server

FortiManager MCP Server

by rstierli

wait_for_task

Poll FortiManager task status until completion or timeout so you know when installation or provisioning operations finish before proceeding.

Instructions

Wait for a task to complete.

Polls the task status until it completes or times out. Useful for waiting on installation or provisioning operations.

Args: task_id: Task ID number timeout: Maximum wait time in seconds (default: 300, capped at 3600) poll_interval: Seconds between status checks (default: 5)

Returns: dict: Final task status with keys: - status: "success" (task ended done or warning) or "error" (error, cancelled, aborted, timeout) - task: Final task object - task_state: Decoded end state (done, warning, error, cancelled, aborted) - completed: Whether task completed (vs timeout) - message: Status or error message

A "warning" task finished; its lines (get_task) say what was
skipped, e.g. an install that found nothing to push.

Example: >>> # Wait for policy installation >>> result = await wait_for_task(12345, timeout=600) >>> if result['completed']: ... print("Installation finished!")

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": {
      "task_id": "<task_id>"
    },
    "name": "wait_for_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
task_idYes
timeoutNo
poll_intervalNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does reasonably well: it discloses the polling loop, the 3600-second cap on timeout, and the mapping of task end states to 'success'/'error', including the subtle case where a 'warning' task counts as completed. It does not say how a nonexistent task_id or API failure surfaces (exception vs. error status), which is the main remaining behavioral gap.

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?

Content is front-loaded, with purpose first, then Args/Returns/Example in a predictable structure. The Args block slightly repeats defaults already present in the schema, and the example is somewhat verbose, but neither is wasteful enough to hurt readability.

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 polling tool with three parameters, the description covers timing defaults and caps, terminal-state semantics, and the completed-vs-timeout distinction. Return-value detail is partly redundant given an output schema exists, but nothing essential for a correct invocation is missing except error-path behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description compensates by giving units and bounds for timeout ('Maximum wait time in seconds, capped at 3600') and the meaning of poll_interval, which the schema alone does not convey. task_id is only described as 'Task ID number', so it does not help the agent find a valid ID (e.g., from the initiating call or get_task).

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 opens with a specific verb and resource ('Wait for a task to complete') and immediately explains the mechanism ('Polls the task status until it completes or times out'). This cleanly separates it from the non-blocking sibling get_task, which is named as the place to inspect task lines.

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?

It gives clear usage context ('Useful for waiting on installation or provisioning operations') plus a concrete example of waiting on a policy installation. It does not explicitly state when NOT to use it (e.g., a quick non-blocking check should use get_task instead), so it stops short of full when/when-not guidance.

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

Deploy Server

Other Tools