Skip to main content
Glama

Rank symbols by a measured count

codetopo_rank
Read-only

Ranks top code symbols by fan-in, fan-out, blast radius, or cyclomatic complexity to identify high-impact or complex code from an indexed repository.

Instructions

The top symbols by fan-in, fan-out, blast-radius size, or cyclomatic complexity - counts over the graph, with the count's method stated in the result. A ranking of measurements, never a score of code quality.

Input Schema

NameRequiredDescriptionDefault
byNoMetric to rank by: fan_in, fan_out, blast_radius (default), or complexity.
limitNoMaximum entries to return. Default 20.
db_pathYesPath to the index database.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.0
    • changedInput schema / properties / by / description
      Previous value: -"Metric to rank by: fan_in, fan_out, or blast_radius (default)."New value: +"Metric to rank by: fan_in, fan_out, blast_radius (default), or complexity."
  2. Addedv0.6.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish readOnly=true and destructive=false, so safety needs no restating. The description adds genuine context beyond them: the result states the method used for each count, and the output is explicitly framed as a measurement ranking rather than a quality score, which guards against misreading. It stops short of describing ordering, tie handling, or response shape.

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?

Two compact sentences, front-loaded with the ranked metrics and followed by the important clarification about what the counts mean. Every clause carries information; the only mild weakness is the terse, fragment-like phrasing of the first sentence.

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?

For a read-only, three-parameter ranking tool with no output schema, the description covers what is ranked, that counts are method-annotated in results, and that the output is not a quality judgment. Ordering, pagination behavior, and empty-result handling remain unstated but are minor for this shape of tool.

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 coverage is 100%, so all three parameters already carry descriptions including the default metric (blast_radius) and default limit of 20. The description restates the same four metric names but adds no syntax, format, or interaction detail beyond the schema, so baseline 3 applies.

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 gives a specific verb and resource ('top symbols by fan-in, fan-out, blast-radius size, or cyclomatic complexity') and names the exact metrics that are ranked. It distinguishes itself implicitly from metric-reporting siblings via 'A ranking of measurements, never a score of code quality', though it never names codetopo_metrics or codetopo_blast_radius directly.

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 only implied: the reader infers this is for finding the top-N symbols under a chosen metric. There is no explicit guidance about when to prefer this over codetopo_blast_radius (which appears to measure the same thing for a single symbol) or codetopo_metrics (a related aggregation). No exclusions or prerequisites are stated.

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