Skip to main content
Glama

list_entities

Lists all functions, variables, and types defined in a specified source file, ordered by line number, so you can inspect a file's compiler-verified entities.

Instructions

列出指定源文件中定义的全部实体(函数/变量/类型),按行号排序。

Input Schema

NameRequiredDescriptionDefault
fileYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden; it discloses that results are ordered by line number, which is genuine behavioral information. It says nothing about behavior for a missing/unparsable file, whether nested or imported entities are included, or the size of the result for large files.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with the action and resource first and the ordering guarantee last. The parenthetical entity list earns its place by defining scope; nothing is redundant.

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?

This is a simple one-parameter read tool and an output schema exists, so return-shape explanation is unnecessary. The only missing piece is the file-path convention and error behavior, which a single clause would fix.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

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

Schema description coverage is 0% for the single required 'file' parameter, so the description must compensate and only partly does—'源文件' tells the agent the path must point at a source file, but not whether it is absolute, workspace-relative, or repo-rooted. That is the one detail most likely to cause a failed call.

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 (列出...实体) scoped to a single source file, and enumerates the entity kinds it covers (函数/变量/类型). It implies but never states the contrast with search_entities, so an agent must infer which of the two to pick.

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 phrase '指定源文件中' implies 'use this when you already know the file and want everything in it,' which indirectly separates it from search_entities. No explicit when-to-use/when-not-to-use statement or alternative is named.

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