Skip to main content
Glama

列出全部工具与必填参数

list_tools
Read-onlyIdempotent

List all tools with their parameters and example calls to quickly align on correct argument names, preventing trial-and-error from inconsistent parameter naming.

Instructions

一次列出本服务的全部工具:名称、用途、必填/可选参数与最小调用示例(example_args 可直接照抄成 args)。AI 冷启动、或不确定某工具准确参数名时先调它——本服务的参数命名不统一(有 query/expr/addr/n_bytes 等),只靠 'Field required' 报错试错代价高;这里一次就能对齐。keyword 按工具名或用途子串过滤(如 keyword="breakpoint"、"mem"、"断点"),留空返回全部。 【输出控制】本工具返回体可能较大,额外接受三个可选参数:compact=true(精简)/ max_lines=N(限制列表条数)/ full=true(强制全量)。默认都不传=行为不变;被裁掉的内容一定会在返回体的 output 字段里如实上报(truncated/dropped/trimmed/hint),不会静默丢数据。也可用环境变量 MDKDEBUG_COMPACT=1 / MDKDEBUG_MAX_LINES=N 设全局默认。 【参数】必填: 无;可选: keyword, compact, max_lines, full 【调用示例】{} 【参数别名】keyword ← filter/name/query/search。规范名以上方【参数】行为准;未列出的参数名会被拒绝,不会静默忽略

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fullNo强制返回全量:忽略 compact/max_lines 与对应环境变量的默认值。当上面两项让你只看到部分数据、而你要据此下结论时,用它取回完整结果。
compactNo精简返回体:去掉空值字段,把列表元素中取值完全相同的字段提到 output.shared,并把 usage/note/hints 之类**说明性**长文本截断到 200 字符(数值与内容字段不动)。被裁掉的东西都会列在 output 里,绝不静默丢弃。不传则不改行为(受 MDKDEBUG_COMPACT 影响)。
keywordNo
max_linesNo限制返回的列表条数(只作用于元素为对象的列表,如 results/items/tools):最多 N 条,其余丢弃并在 output.truncated/dropped/hint 里如实上报。0 或省略=不限(受 MDKDEBUG_MAX_LINES 影响)。

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, so the safety profile is covered. The description adds substantial behavior beyond that: output can be large, truncation (compact/max_lines/full) is always reported in the output field and never silently dropped, env-var defaults (MDKDEBUG_COMPACT/MDKDEBUG_MAX_LINES) influence behavior, and unlisted parameter names are rejected rather than silently ignored. This is exactly the kind of disclosure that prevents agent confusion.

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?

Well-structured with clear section headers (【输出控制】【参数】【调用示例】【参数别名】) and front-loaded purpose. It is fairly long, but every section earns its place: output control, parameter clarity, and alias handling all prevent real agent errors. No filler.

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?

Very complete for a meta-tool: purpose, when to use, output-control behavior, truncation reporting, env-var influence, parameter list, call example, and aliases are all covered. An output schema exists so return values need not be explained. No material gaps remain for an agent to call this 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 coverage is 75%; keyword has no description in the schema (only a 'Keyword' title), but the description adds filtering semantics (substring match on tool name or purpose) with concrete examples ('breakpoint', 'mem', '断点') and aliases (filter/name/query/search). It also reinforces compact/max_lines/full semantics beyond the schema. Good compensation for the keyword gap.

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+resource+scope: '一次列出本服务的全部工具' (lists all tools of this service with name, purpose, required/optional params, and minimal call examples). It is unambiguously the meta/listing tool, clearly distinguished from the 40+ individual sibling tools. The cold-start purpose is explicit.

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?

Explicitly states when to call: 'AI 冷启动、或不确定某工具准确参数名时先调它' (call first on cold start or when unsure of exact parameter names), with the rationale that parameter naming is inconsistent and trial-and-error with 'Field required' errors is costly. It does not enumerate explicit when-not-to-use cases, but for a listing tool the guidance is concrete and actionable.

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