Skip to main content
Glama
rstierli

FortiManager MCP Server

by rstierli

diff_device_revision

Compare a past FortiManager device DB revision against the current device configuration and return a unified diff showing changed lines; read-only.

Instructions

Diff a past device DB revision against the CURRENT device DB.

FortiManager has no native diff endpoint for device DB revisions (unlike ADOM DB revisions -- see diff_adom_revision). This instead fetches both the past revision's config text (checkout) and the current device DB export, then computes a client-side unified line diff. Read-only.

Note: The checkout half of this requires the device to have at least one device DB revision on record -- see the note on list_device_revisions.

Args: device: Managed device name revision: Revision number to compare against current (see list_device_revisions)

Returns: dict: status, device, revision, changed (bool), diff (unified diff text, empty string if unchanged; both sides are redacted of known secret-bearing directives before diffing -- see redact_config_text_secrets -- so a line whose only change is its secret value will not show as changed)

Example: >>> result = await diff_device_revision("hub2", revision=7) >>> if result["changed"]: ... print(result["diff"])

Input Schema

NameRequiredDescriptionDefault
deviceYes
revisionYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.12.0

TDQS

A4.8/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 well: it declares the operation read-only, explains the client-side fetch-and-diff mechanism, and discloses the important redaction caveat that changes only to secret values will not register as changed. It also notes the missing native diff endpoint, which explains why the behavior is non-obvious.

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?

The key scope statement is front-loaded, and the Note/Args/Returns/Example structure is easy to scan. The Returns section and example add length that partly duplicates the output schema, but the redaction nuance genuinely earns its place.

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 non-trivial diff tool with no annotations and 0% schema coverage, the description supplies mechanism, prerequisite, redaction behavior, and argument guidance, while the existing output schema covers return structure. An agent has everything needed to call it correctly.

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%, so the description must compensate, and it documents both parameters: device as the managed device name and revision as the number to compare against current, with a cross-reference to list_device_revisions. It stops short of format or naming conventions, but the added meaning is substantive.

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 first sentence names a specific verb (diff) and resource (a past device DB revision vs the CURRENT device DB), and it explicitly contrasts itself with diff_adom_revision. An agent can distinguish it from sibling revision tools without opening the 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 explicitly routes the agent to diff_adom_revision for ADOM DB revisions, points to list_device_revisions to obtain the revision argument, and states the prerequisite that at least one device DB revision must exist. When-to-use, alternatives, and precondition are all covered.

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