Skip to main content
Glama
GeminiDesk MCP
by LZ7TOP

Clean Up Audit Logs

system_cleanup_audit_logs

Cleans MCP audit logs by retention days, category, status, or latest-record count; pass empty parameters to clear all entries.

Instructions

按保留天数、分类、状态或保留最近条数清理 MCP 审计日志(传空参数则保留最近 0 条即全部清空)。

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

Input Schema

NameRequiredDescriptionDefault
statusNo仅清理成功或失败记录
categoryNo仅清理指定分类的记录
keepLatestNo仅保留最新 N 条记录
olderThanDaysNo清理早于指定天数的记录

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose the most dangerous trait — empty parameters delete all logs — which is genuinely useful. But irreversibility, required permissions, and whether the operation is transactional or partial are not stated.

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?

A single sentence with no wasted words, dimensions listed compactly, and the critical empty-parameter caveat kept in a parenthetical attached to the action. Slight deduction for burying the destructive default at the end rather than front-loading it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive bulk-delete tool with zero annotations and no output schema, the description covers the filters and the wipe-all default but omits irreversibility, permissions, and whether a deletion count is returned. It also does not differentiate itself from the similarly named logs_cleanup sibling.

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 already 100%, so the baseline is 3, yet the description adds real meaning beyond the schema: it documents that passing no parameters resolves keepLatest to 0 and wipes everything, which the schema's minimum:0 on keepLatest does not convey. It also maps each filter (days, category, status, count) to its semantic role rather than just repeating field names.

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 description names a specific verb (清理) and resource (MCP 审计日志), and enumerates the exact filter dimensions (保留天数、分类、状态、保留最近条数). This is clearly distinguishable from the read-side sibling system_get_audit_logs, so an agent can pick it 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 Guidelines3/5

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

Usage is implied by the cleanup framing, and the parenthetical about empty parameters (keep 0 = clear everything) is a valuable usage warning. However, there is no explicit when-not-to-use guidance, no mention of when to prefer system_get_audit_logs first, and no statement of whether the filters combine as AND.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.