Skip to main content
Glama

get_health

Self-check code health before or after editing a file, returning defect-risk, maintainability, and performance scores plus ranked findings and a directive for the file to fix first.

Instructions

Code-health scores and findings — self-check a file before/after editing.

No ``targets`` → repo dashboard, led by a ``directive`` naming the one file
to fix first. With ``targets`` → per-file scores + findings. Rank by
``weighted_deficit``, not ``score``: the score floors at 1.0 and cannot
separate the worst band.

Three co-equal dimensions per file: ``score`` (defect risk, the headline),
``maintainability_score``, and ``performance_score`` (static I/O-in-loop /
N+1 risk, never blended into the defect headline). Each finding carries its
``dimension``.

Args:
    targets: file paths or ``module:<name>``. Empty → dashboard mode. Any
        target matching nothing is named in ``unresolved`` with a reason
        (``not_indexed`` → run ``repowise update`` | ``no_such_path`` |
        ``excluded`` | ``no_such_module``), so an empty ``findings`` means
        healthy and nothing else.
    include: opt-in blocks: ``biomarkers`` | ``refactoring`` | ``trend`` |
        ``coverage`` | ``accuracy`` | ``signals`` | ``churn_complexity`` |
        ``performance``/``defect``/``maintainability`` (filter findings to
        one dimension).
    only: keep just these top-level keys. ``include`` adds blocks, ``only``
        subtracts them — pass ``["directive"]`` for the cheapest useful call.
    repo: usually omitted.
    limit: max rows in every ranked list (capped at 50); each carries a
        ``*_total`` sibling so truncation is never silent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
onlyNo
repoNo
limitNo
includeNo
targetsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations are provided, but the description carries the full burden and does so thoroughly. It discloses that ranking should use weighted_deficit because score floors at 1.0, explains unresolved target reasons, notes that an empty findings list means healthy, and warns about truncation via *_total siblings. These are behavioral details far beyond a simple 'returns health data'.

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?

Although the description is long, it is dense and well-structured: a front-loaded purpose, a clear mode explanation, dimension semantics, and a compact Args list. Every sentence earns its place, and the use of code spans and arrow-patterns makes the operational logic easy to scan.

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?

The description covers all five parameters, two operational modes, edge cases (unresolved targets, truncation), ranking guidance, and dimension semantics. Given the output schema exists, the description doesn't need to enumerate return fields, and it is complete enough for an AI agent to select and invoke the tool correctly without further clarification.

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?

With 0% schema description coverage, the description compensates completely. It explains targets with mode-dependent behavior and unresolved reasons, include with block names, only as a subtractive filter, repo as usually omitted, and limit with capping and truncation signaling. This adds substantial meaning well beyond the bare schema property types.

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?

The description opens with 'Code-health scores and findings — self-check a file before/after editing', giving a specific verb and resource that clearly distinguishes it from sibling tools like get_risk or get_change_risk. The dashboard-vs-targets mode further clarifies exactly what scope the tool operates at.

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

Usage Guidelines4/5

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

The description explicitly says when to use the tool: for self-checking a file before/after editing, and explains when to use no targets (repo dashboard) versus with targets (per-file scores). It does not explicitly exclude alternatives or mention sibling tools, but the intended usage context is clear and well-scoped.

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/repowise-dev/repowise'

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