Skip to main content
Glama
ry-ops

fortigate-mcp-server

by ry-ops

get_logs

Read FortiGate logs newest-first by type, filter, field, and source to troubleshoot traffic, security, or system events across VDOMs, memory, disk, FortiAnalyzer, or FortiCloud.

Instructions

Read FortiGate logs, newest first. Useful types: traffic/forward (sessions through policies, with app identification), app-ctrl (per-connection application and, with certificate inspection, the HTTPS hostname), event/system (admin and config events), ips, webfilter. FortiGate-VMs without a log disk only keep logs in memory, which is lost on reboot.

Input Schema

NameRequiredDescriptionDefault
rowsNoRows to return (default 50, max 1000)
vdomNoVDOM (default: FORTIGATE_VDOM, usually root)
startNoOffset for paging (default 0)
fieldsNoOnly return these fields per row, e.g. [date, time, srcip, dstip, hostname, app, action]
filterNoFortiOS log filter, e.g. srcip==192.168.150.10 or hostname=@github. A comma ORs values of one field (dstport==4332,dstport==4432); pass a list to AND terms ([srcip==10.0.0.5, dstport==443]).
sourceNomemory (default), disk, fortianalyzer or forticloud
log_typeYesOne of: traffic/forward, traffic/local, traffic/multicast, traffic/sniffer, event/system, event/user, event/router, event/vpn, event/wad, event/endpoint, event/ha, event/security-rating, event/fortiextender, event/connector, app-ctrl, ips, virus, webfilter, dns, ssl, ssh, file-filter, anomaly, waf, emailfilter, dlp, voip, gtp, icap, virtual-patch
resolve_vmsNoLabel IPs/MACs with the Proxmox VM that owns them (needs PROXMOX_*)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.1.3
    • addedInput schema / properties / filter / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / filter / description
      Previous value: -"FortiOS log filter, e.g. srcip==192.168.150.10 or policyid==1 or hostname=@github"New value: +"FortiOS log filter, e.g. srcip==192.168.150.10 or hostname=@github. A comma ORs values of one field (dstport==4332,dstport==4432); pass a list to AND terms ([srcip==10.0.0.5, dstport==443])."
    • removedInput schema / properties / filter / type
      Removed value: -"string"
  2. First observedv0.4.1

TDQS

A3.8/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 burden, and it does disclose two non-obvious behaviors: results are ordered newest-first, and on FortiGate-VMs without a log disk, logs live only in memory and are lost on reboot. It does not cover pagination semantics or required permissions, but the retention caveat is genuinely useful operational context.

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 the core action and ordering, then a compact catalog of log types, then the retention caveat. The type enumeration is long but each entry carries differentiating information, so little is wasted.

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?

All 8 parameters are documented in the schema and there is no output schema to explain, so the description only needs to add orientation. It supplies result ordering, log-type meaning, and a deployment caveat; the main gap is paging behavior (start/rows) and any authorization requirement.

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, and the description earns a bump by explaining what several log_type values actually contain ('traffic/forward' = sessions through policies with app identification; 'app-ctrl' = per-connection app and HTTPS hostname under certificate inspection). This adds meaning beyond the bare enum list in the schema, and the memory/disk remark contextualizes the 'source' parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Read FortiGate logs') plus the ordering convention ('newest first'), which tells an agent exactly what comes back. It never names a sibling (e.g. get_log_targets, which configures destinations rather than reading), so the differentiation from the many list_/get_ siblings is left implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains which log types are 'useful' and what each contains, which implicitly guides log_type selection, but it never states when to reach for get_logs versus related tools like get_log_targets, list_sessions, or audit_admin_access. No exclusions or prerequisites are given.

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