Skip to main content
Glama

Solar Power Genius

Rank states

spg_rank_states
Read-onlyIdempotent

Rank the 50 states and DC by one measure: the 2025 home electricity rate, expected solar output (kWh per kW a year, PVWatts), best-case payback of a typical 7.7 kW system, or Berkeley Lab's median installed price (only the 16 states it reports).

Examples: "Where does solar pay back fastest?" -> metric="payback", order="asc". "Most expensive electricity" -> metric="rate", order="desc".

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": {
      "metric": "<metric>"
    },
    "name": "spg_rank_states"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
orderNodesc: highest first; asc: lowest firstdesc
metricYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, closed-world and non-destructive, so the safety profile is covered. The description does add genuine behavioral context beyond that: the 2025 data vintage, PVWatts as the solar-output source, the 7.7 kW system assumption behind payback, and the important caveat that the price metric only covers 16 states. It omits what a ranked row contains or how ties are handled.

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?

Front-loaded with the core action and the enumerated measures, followed by two compact examples that earn their place by showing parameter mapping. The long metric clause is dense but each item carries distinct information; nothing is padded.

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 should indicate what a result looks like (state, measure value, rank position) and it does not. Otherwise it is complete enough for a simple read-only ranking call: the measures, ordering, default limit, and data caveats are all recoverable.

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

Parameters4/5

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

Schema coverage is only 33% (only 'order' is documented), so the description must compensate, and it does: it defines each of the four metric enum values with units and data provenance and flags the 16-state restriction on 'price'. The 'limit' parameter (default 10, max 51) is left entirely to 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?

States a specific verb and resource ('Rank the 50 states and DC') and enumerates the four rankable measures, so the scope is unambiguous. It falls short of a 5 because it never distinguishes itself from plausible siblings such as spg_state_solar or spg_solar_payback, even though 'payback' overlaps directly with one of them.

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 worked examples ('Where does solar pay back fastest?' -> metric="payback", order="asc") effectively teach when to reach for this tool and how to map a natural-language question onto parameters. There is no explicit when-not guidance or named alternative for cases like looking up a single state.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources