Skip to main content
Glama
rstierli

FortiManager MCP Server

by rstierli

resolve_datasource

Resolve which objects a FortiManager config attribute can reference by querying a pm/config table and attribute, so you can validate or build valid references.

Instructions

Resolve the objects a config attribute is allowed to reference.

Generic config-DB introspection built on FortiManager's option: datasrc mechanism: given a cdb table url and an attribute name attr, FMG returns every object attr may reference. For example, the objects an SD-WAN service (steering) rule can point at -- internet-service-names, address groups, etc. Documented generically in the swagger cdb get-params (params.cdb.get.table.option.opts -> datasrc, requires attr).

Only pm/config endpoints are accepted -- arbitrary URLs are rejected.

Args: url: A cdb config path, e.g. "pm/config/adom/root/obj/system/sdwan" attr: The attribute whose referenceable objects to resolve, e.g. "internet-service-name" or "service" adom: ADOM name (informational; default: DEFAULT_ADOM env var or "root")

Returns: dict with keys: - url, attr, adom - datasource: raw list/dict of referenceable objects - error / error_code: on failure

Input Schema

NameRequiredDescriptionDefault
urlYes
adomNo
attrYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.12.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the underlying FortiManager 'option: datasrc' mechanism, the pm/config-only restriction, and the failure shape (error/error_code). It never explicitly says the call is read-only/no side effects, which is the one behavioral trait left implicit.

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 purpose followed by clean Args/Returns blocks. The one piece of waste is the internal swagger cross-reference ('params.cdb.get.table.option.opts -> datasrc'), which documents the implementation rather than helping the agent call the tool.

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 3-param introspection tool with an output schema, the description covers purpose, all parameters, the endpoint restriction, and the error keys. The Returns block partially duplicates the output schema, but nothing an agent needs in order 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.

Parameters5/5

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

Schema coverage is 0%, so the description must compensate, and it does: url gets a concrete path example ('pm/config/adom/root/obj/system/sdwan'), attr gets two example values, and adom is explained as informational with its DEFAULT_ADOM/root default. This adds real meaning beyond the bare string types in 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 ('Resolve the objects a config attribute is allowed to reference') and immediately grounds it with a concrete example (SD-WAN service rule -> internet-service-names, address groups). No sibling tool in the list performs reference/datasource resolution, so the agent can distinguish it without opening schemas.

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?

Explains the situation that calls for it (introspection of what an attribute may point at) and gives a hard exclusion: 'Only pm/config endpoints are accepted -- arbitrary URLs are rejected.' It does not name an alternative tool or a when-not-to-use case beyond the URL constraint, so it stops short of a 5.

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