Skip to main content
Glama

stackexchange-mcp-server

List Stack Exchange Sites

stackexchange_list_sites
Read-onlyIdempotent

Enumerate all sites in the Stack Exchange network — name, api_site_parameter, audience, and URL. The api_site_parameter value is what other tools accept as the site input (e.g. "stackoverflow", "superuser", "serverfault"). Results are fetched live and optionally filtered by name. Use this tool to discover valid site parameters before calling other stackexchange_* tools.

Input Schema

NameRequiredDescriptionDefault
filterNoOptional case-insensitive name filter — returns only sites whose name contains all provided tokens. Omit to return all sites.

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
sitesNoStack Exchange network sites matching the optional name filter.
noticeNoActionable guidance when results are empty or filtered.
quotaMaxNoMaximum API quota calls per day (300 keyless, ~10,000 with API key).
totalCountNoTotal number of sites returned after filtering.
quotaRemainingNoRemaining API quota calls for the current day.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `quota_exceeded`: The Stack Exchange API quota_remaining reached 0 during the site page walk. `invalid_parameter`: Stack Exchange rejected a parameter of the /sites request and named the field. `invalid_api_key`: Stack Exchange does not recognize the API key this server is configured with. `upstream_unavailable`: Stack Exchange answered with a body that is not the expected JSON envelope. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `quota_exceeded`: The Stack Exchange API quota_remaining reached 0 during the site page walk. `throttled`: Stack Exchange is throttling this server's IP address, or its backoff window outlasts what the call can wait. `pacer_shed`: The call would wait in this server's queue to Stack Exchange longer than its time budget allows. `invalid_parameter`: Stack Exchange rejected a parameter of the /sites request and named the field. `invalid_api_key`: Stack Exchange does not recognize the API key this server is configured with. `upstream_unavailable`: Stack Exchange reported itself temporarily unavailable or failing internally, or answered with a body that is not the expected JSON envelope. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "quota_exceeded",
      -  "invalid_parameter",
      -  "invalid_api_key",
      -  "upstream_unavailable"
      -]New value: +[
      +  "quota_exceeded",
      +  "throttled",
      +  "pacer_shed",
      +  "invalid_parameter",
      +  "invalid_api_key",
      +  "upstream_unavailable"
      +]
  2. Changed2 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode."New value: +"Machine-readable failure mode. Declared by this tool: `quota_exceeded`: The Stack Exchange API quota_remaining reached 0 during the site page walk. `invalid_parameter`: Stack Exchange rejected a parameter of the /sites request and named the field. `invalid_api_key`: Stack Exchange does not recognize the API key this server is configured with. `upstream_unavailable`: Stack Exchange answered with a body that is not the expected JSON envelope. Other values are possible when a failure originates below the handler."
    • addedOutput schema / properties / error / properties / data / properties / reason / examples
      Added value: +[
      +  "quota_exceeded",
      +  "invalid_parameter",
      +  "invalid_api_key",
      +  "upstream_unavailable"
      +]
  3. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "sites",
      +      "totalCount",
      +      "quotaRemaining",
      +      "quotaMax"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode.",
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "sites",
      -  "totalCount",
      -  "quotaRemaining",
      -  "quotaMax"
      -]
  4. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false, and idempotentHint=true, so safety is covered; the description adds that results are 'fetched live' (no stale cache) and that filtering is by name. It does not mention rate limits or result-set size, which is the remaining gap for a network-wide enumeration call.

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?

Three tight sentences ordered by importance: what it returns, what the key field is for downstream tools, then when to use it. No repetition of the title or filler.

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?

An output schema exists and the description still names the salient returned fields; the single optional parameter and the zero-required-args path are clear. Nothing an agent needs to call this discovery tool correctly is missing.

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?

With 100% schema coverage the baseline is 3, but the description adds real meaning: it identifies the returned `api_site_parameter` as the value other tools accept as their `site` input and gives concrete examples ('stackoverflow', 'superuser', 'serverfault'). That cross-tool mapping is not derivable from the schema alone.

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?

States a specific verb (enumerate) and resource (all sites in the Stack Exchange network) and lists exactly what each record contains: name, api_site_parameter, audience, URL. It is clearly distinct from the sibling tools, which all operate on threads, users, tags, or search rather than network-level site metadata.

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

Usage Guidelines5/5

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

Explicitly instructs: 'Use this tool to discover valid site parameters before calling other stackexchange_* tools,' which names both the trigger and the alternative set. It also explains that filtering is optional and how to get all sites (omit the filter), leaving nothing to inference.

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.