Skip to main content
Glama

get_dead_exports

Read-onlyIdempotent

Find exported symbols with unused export keywords. Get recommendations to remove the export or delete the symbol based on internal usage analysis.

Instructions

Find exported symbols whose export keyword has no external consumer. Each item carries signals (which detectors fired) and recommendation: "remove_export_keyword" when the symbol is still used inside its own file (just un-export it, keep the declaration), "delete_symbol" when no in-file usage was detected. NOTE: this tool flags dead EXPORT KEYWORDS, not necessarily dead SYMBOLS. For strict dead-symbol detection (multi-signal: import graph + call graph + barrel re-exports + intra-file usage, only flags symbols with NO incoming references anywhere) use get_dead_code instead — it will reject anything get_dead_exports tags remove_export_keyword. Paginated: caps result list at limit (default 100, max 500); when more exist the response includes truncated: true and total_dead reflects the full count. Read-only. Returns JSON: { dead_exports: [{ symbol_id, name, kind, file, line, signals, recommendation }], total_dead, total_exports, truncated? }. Set output_format: "toon" for lossless TOON encoding — cheaper LLM tokens on tabular payloads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_patternNoFilter files by glob pattern (e.g. "src/tools/*.ts")
limitNoMaximum number of dead exports to return (default 100, max 500). When more exist, response carries `truncated: true` and `total_dead` reflects the full count.
output_formatNoOutput format. "json" (default) returns JSON, "markdown" returns LLM-friendly fenced markdown (tool-specific), "toon" returns Token-Oriented Object Notation — 30-60% fewer tokens on tabular data, fully lossless.
Behavior5/5

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

Annotations already indicate readOnlyHint=true, destructiveHint=false, etc. Description adds key behavioral details: flags dead export keywords (not dead symbols), pagination with truncated/total_dead, and that it is read-only. No contradiction.

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?

Every sentence adds value. Well-structured: purpose, differentiation, pagination, read-only, output format. No wasted words.

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?

No output schema, but description explains output structure (dead_exports array fields, total_dead, total_exports, truncated). Covers all parameters and behavioral aspects. Annotations cover safety.

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

Parameters5/5

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

Schema coverage is 100%. Description adds meaning beyond schema: file_pattern glob filtering, limit default/max/truncation, output_format enum explanations (json, markdown, toon with token savings).

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?

Description clearly states the tool finds exported symbols with no external consumer, explains the output fields (signals, recommendation), and distinguishes from `get_dead_code` by detailing the difference between dead export keywords and dead symbols.

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

Usage Guidelines5/5

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

Explicitly says when to use this tool vs `get_dead_code`, provides pagination limits (limit default 100, max 500, truncated behavior), and includes guidance on output_format options including 'toon' for token efficiency.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nikolai-vysotskyi/trace-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server