Skip to main content
Glama
FortiManager MCP Server

FortiManager MCP Server

by rstierli

list_tasks

Retrieve FortiManager background jobs ordered by recency, filter by state or recent hours, and cap results to monitor policy installs, provisioning, and long-running operations without bulky payloads.

Instructions

List FortiManager tasks, newest first.

Tasks represent background operations like policy installation, device provisioning, and other long-running processes.

Changed in 1.13.0: returns the newest limit tasks (default 100; total says how many matched) and drops each task's line list unless include_lines is set. It used to return every task with its lines, which can reach hundreds of KB per call. Raise limit or narrow with since_hours to see further back.

Args: filter_state: Filter by task state (optional): - "pending": Not started - "running": Currently executing - "done": Completed - "error": Failed - "cancelling": Being cancelled - "cancelled": Cancelled limit: Maximum number of tasks to return (default: 100) since_hours: Only tasks started in the last N hours (optional) include_lines: Include each task's per-device lines and history (default: False, they can reach hundreds of KB; get_task reads them for one task)

Returns: dict: Task list with keys: - status: "success" or "error" - count: Number of tasks returned - total: Number of tasks matching before limit - tasks: List of task objects with id, state, progress, etc. - message: Error message if failed

Example: >>> # Get all tasks >>> result = await list_tasks()

>>> # Get only running tasks
>>> result = await list_tasks(filter_state="running")

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

Input Schema

NameRequiredDescriptionDefault
limitNo
since_hoursNo
filter_stateNo
include_linesNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.13.1
    • addedInput schema / properties / include_lines
      Added value: +{
      +  "default": false,
      +  "title": "Include Lines",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 100,
      +  "title": "Limit",
      +  "type": "integer"
      +}
    • addedInput schema / properties / since_hours
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Since Hours"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: default page size of 100, newest-first ordering, ``total`` vs ``count`` truncation semantics, and that ``line`` lists are dropped unless ``include_lines`` is set to avoid hundreds of KB payloads. It even flags a behavioral change in 1.13.0 so an agent won't assume full-history returns.

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?

Front-loaded summary, then change note, then Args/Returns/Example – well organized. The 1.13.0 changelog paragraph and the example block are slightly more than an agent strictly needs, but both earn partial keep (truncation behavior, state filtering).

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?

For a four-param, zero-required listing tool with no annotations, the description covers purpose, defaults, pagination/truncation, payload-size trade-offs, per-state filtering, and the output keys. Nothing material is missing for correct invocation.

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

Parameters5/5

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

Schema coverage is 0%, yet all four parameters are explained, including the six valid ``filter_state`` values that are not an enum in the schema, plus defaults for ``limit`` and ``include_lines`` and the cost implication of enabling lines. This fully compensates for the undocumented 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?

Opens with a specific verb+resource+ordering: "List FortiManager tasks, newest first." It also characterizes what a task is (background ops like policy install, device provisioning), which separates it from list_* resource tools and from get_task ("get_task reads them for one task").

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 concrete guidance: raise ``limit`` or narrow with ``since_hours`` to see further back, and route per-task detail (lines/history) to get_task. It lacks an explicit "don't use this when..." statement for the other siblings, but the when-to-use context is clear.

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