Skip to main content
Glama

dup_suggest_extraction

Find duplicate code blocks and get actionable suggestions to extract them into shared utilities.

Instructions

Suggest how to extract duplicated code into shared utilities (Pro feature)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNo
directoryYesProject directory
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. 'Suggest how to extract' implies an advisory, non-mutating operation, but it does not clarify whether the tool modifies files, requires an API key, accesses an external service, or returns a plan. The Pro feature flag adds a constraint but not enough behavioral context.

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?

The description is a single, efficient sentence with no filler. The core purpose is front-loaded, and the Pro feature qualifier is appended compactly. Every word contributes to conveying the tool's function.

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

Completeness2/5

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

For a tool with no annotations, no output schema, and only partial parameter documentation, the description is too sparse. It lacks information about expected output format, the significance of api_key, prerequisites like prior duplicate detection, or whether the operation is read-only. An agent could not confidently determine invocation semantics beyond passing a directory.

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

Parameters2/5

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

The schema already documents 'directory' as 'Project directory', and the description does not add any parameter-level meaning beyond that. The 'api_key' parameter has no description in the schema and is not mentioned in the tool description, leaving it unexplained. With schema coverage at only 50%, the description should compensate but does not.

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?

The description states a clear verb and resource: 'Suggest how to extract duplicated code into shared utilities.' This distinguishes it from sibling tools like dup_find_similar_blocks and dup_find_copy_paste, which focus on detection rather than extraction suggestions. It stops short of a 5 because it doesn't explicitly scope the analysis to a directory or mention the input requirements.

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

Usage Guidelines2/5

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

No guidance is given for when to use this tool versus related siblings such as dup_find_copy_paste or smell_refactor_plan. The '(Pro feature)' tag hints at a licensing prerequisite but does not explain a workflow, preconditions, or alternatives. The agent is left to infer usage context.

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/barnburner121/claude-plugin-marketplace'

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