Skip to main content
Glama
mdemirn

FortiGate MCP Server

by mdemirn

log_get

Read raw FortiGate log records from any log endpoint by device and path, with optional row limits, VDOM, and FortiOS filter expressions for targeted troubleshooting.

Instructions

Read raw log records from any log endpoint (GET /api/v2/log/{path}).

path is "{memory|disk}/{type}/{subtype}", e.g. "memory/event/system", "memory/event/vpn", "memory/utm/webfilter", "memory/traffic/local", "disk/traffic/forward". Prefer query_traffic_log / query_event_log / query_utm_log for formatted output.

Parameters:

  • device_id: Identifier of the FortiGate device

  • path: log path

  • rows: Maximum records (default 50, max 500)

  • filter_expr: Optional FortiOS filter, e.g. "srcip==10.0.0.5" ("&" joins several)

  • vdom: Virtual Domain name (optional)

Returns:

  • The raw JSON log records

Input Schema

NameRequiredDescriptionDefault
pathYeslog path, e.g. memory/event/system
rowsNoMaximum records
vdomNoVirtual Domain
device_idYesFortiGate device identifier
filter_exprNoFortiOS filter expression(s), '&'-joined

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations the description carries the full load, and it does disclose the row cap (max 500), the filter conjunction syntax, and that the return is unformatted JSON. It omits operational traits an agent would want: memory vs disk retention semantics, permission requirements, and any rate/latency behavior for large pulls.

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 with purpose and API path, then a compact Parameters/Returns block that is easy to scan. The cost is that the parameter list largely duplicates a schema that is already 100% documented, so a few lines do not earn their place.

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?

Adequate for a five-parameter read tool with no output schema: path grammar, filter syntax, row bounds, and sibling alternatives are all present. Gaps are the memory-vs-disk distinction and multi-VDOM requirements, which materially affect how the call behaves.

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 coverage is 100%, so the baseline is 3, but the description adds genuine value beyond it: the path grammar "{memory|disk}/{type}/{subtype}" with five concrete examples, and the note that "&" joins multiple filter expressions. device_id and vdom are only restated, which keeps it from a 5.

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?

Specific verb ("Read raw log records") plus resource (any log endpoint) with the underlying REST path GET /api/v2/log/{path}. It explicitly contrasts with the sibling query_traffic_log/query_event_log/query_utm_log tools, so an agent can distinguish it without opening a schema.

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 names the three formatter siblings and the condition that favors them ("for formatted output"), which gives clear routing logic. It stops short of saying when raw access is actually preferable (parsing custom fields, unsupported log types) or what to do if a path is invalid.

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