Skip to main content
Glama
Smart Quota Orchestrator

Smart Quota Orchestrator

by ElNeMeR70

sqo_code_hotspots

Sync an incremental mtime-cached SQLite code graph to identify bug-prone hotspots and unreferenced orphan modules ranked by cyclomatic complexity and import fan-in.

Instructions

Sync incremental mtime-cached SQLite code graph (<10ms warm) and return top Cyclomatic Complexity x Import Fan-In bug hotspots plus unreferenced orphan modules.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspace": "<workspace>"
    },
    "name": "sqo_code_hotspots"
  }
}

Input Schema

NameRequiredDescriptionDefault
top_kNoNumber of top hotspots to return (default: 10).
workspaceYesWorkspace root path.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv13.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden, and it does disclose real traits: incremental mtime caching, a sub-10ms warm path, and a local SQLite graph. However, it never states that 'sync' writes or updates an on-disk SQLite database, what the cold/first-run cost is, or whether the graph is shared across calls. Those undisclosed side effects matter for a tool that mutates local state.

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?

A single dense sentence that front-loads the action and the payoff, with zero filler. It is jargon-heavy ('mtime-cached', 'Cyclomatic Complexity x Import Fan-In') but every clause carries information. Splitting the sync behavior from the return values would improve scanability slightly.

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

Completeness3/5

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

With no output schema, the description must convey return values, and it does name the two result sets (ranked hotspots, orphan modules) and the ranking formula. It omits the result shape, whether orphan detection requires extra parameters, and the persistence side effects of the sync step, leaving gaps for a tool of this complexity.

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 100%, so both parameters (workspace, top_k) are already documented in the schema, establishing the baseline of 3. The description adds the concept of a ranking dimension but says nothing about what top_k truncates or how workspace scope affects the graph. No value is added beyond the schema.

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 uses a specific compound verb and names the exact artifacts: it syncs an mtime-cached SQLite code graph and returns bug hotspots ranked by Cyclomatic Complexity x Import Fan-In, plus unreferenced orphan modules. That is far more specific than a generic 'analyze code' tool and lets an agent distinguish it from siblings like sqo_dead_code or sqo_code_search. It stops short of explicitly naming a sibling it replaces, which keeps it out of 5 territory.

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 phrase 'bug hotspots' and 'orphan modules' signals the risk/refactor-audit scenario, but there is no explicit when-to-use or when-not-to-use guidance and no pointer to alternatives such as sqo_dead_code. An agent can infer the scenario but must guess at the boundary conditions.

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