Skip to main content
Glama

stackexchange-mcp-server

Get Stack Exchange Q&A Thread

stackexchange_get_thread
Read-onlyIdempotent

Fetch a complete Q&A thread — question body and all answers, accepted answer first then sorted by score, rendered as clean markdown with fenced code blocks. Accepts an integer question ID or a full Stack Exchange question URL (e.g. "https://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster" or "11227809"). HTML is normalized to markdown automatically; attribution (author + link) included per CC BY-SA 4.0. Get question IDs from stackexchange_search_questions or stackexchange_get_tag_faq.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteNoStack Exchange site — use the api_site_parameter value (e.g. "stackoverflow", "superuser"). Defaults to "stackoverflow". Must match the site where the question lives. Call stackexchange_list_sites to discover valid values.stackoverflow
maxAnswersNoMaximum number of answers to include (1–100, default 10). Answers are sorted: accepted first, then by score.
questionIdOrUrlYesNumeric question ID (e.g. "11227809") or a full Stack Exchange question URL (e.g. "https://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster"). The integer immediately following /questions/ is extracted from URLs.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoThe maxAnswers cap applied to this request.
linkNoDirect URL to the question.
tagsNoTags applied to this question.
errorNoPresent when the call failed. Absent on success.
scoreNoQuestion score (upvotes minus downvotes).
shownNoNumber of answers returned.
titleNoQuestion title.
answersNoAnswers sorted: accepted answer first, then by score descending.
quotaMaxNoMaximum API quota calls per day (300 keyless, ~10,000 with API key).
truncatedNoTrue when answers were capped at maxAnswers.
authorLinkNoQuestion author profile URL when available.
authorNameNoQuestion author display name when available.
questionIdNoNumeric question ID — identifies this thread on the site.
answerCountNoTotal answers the question has upstream. When greater than the returned answers[] length, more answers exist — raise maxAnswers to fetch them.
authorUserIdNoQuestion author numeric user ID when available — pass to stackexchange_get_user to fetch the full profile.
bodyMarkdownNoQuestion body normalized from HTML to markdown.
quotaRemainingNoRemaining API quota calls for the current day.
acceptedAnswerIdNoID of the accepted answer when one exists.

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the readOnlyHint, openWorldHint, and idempotentHint annotations, the description discloses several behavioral traits: output normalization to markdown, HTML-to-markdown conversion, attribution per CC BY-SA 4.0, answer sorting (accepted first then score), and the acceptance of both ID and URL with URL parsing. These details add value and imply a consistent, read-only operation.

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?

The description is well-structured and front-loaded: the first sentence states the core purpose and output format, the second explains accepted inputs with a concrete example, and the third covers markdown normalization and attribution. Each sentence earns its place with no redundancy, keeping it concise yet informative.

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?

Given the presence of an output schema (indicated true) and the rich parameter descriptions, the description covers the essential operational aspects: input forms, output formatting, sorting, attribution, and source identification. It omits details like error handling or rate limits, but these are not critical for a read-only tool with existing structured schema context, so the description is sufficiently complete.

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?

The input schema already provides comprehensive descriptions for all three parameters (site, maxAnswers, questionIdOrUrl) covering format, defaults, constraints, and examples. The tool description reiterates some of this (accepting ID or URL, sorting) but adds no new semantic meaning beyond what the schema conveys, so baseline 3 is appropriate given 100% schema coverage.

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 states a specific verb 'Fetch' with a precise resource 'complete Q&A thread', and distinguishes the tool by detailing the output: question body plus all answers, accepted answer first, sorted by score, rendered as markdown. It also differentiates from siblings by referencing search_questions and get_tag_faq as sources for IDs, making its role clear.

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?

It explicitly tells the agent where to obtain question IDs ('Get question IDs from stackexchange_search_questions or stackexchange_get_tag_faq'), which implies this tool is for fetching a specific thread once an ID is known. While it does not state 'use this when you have an ID' or list exclusions, the reference to siblings as ID sources gives adequate contextual guidance.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: site discovery, tag-based FAQ retrieval, free-text search, full thread retrieval, and user profile lookup. The descriptions explicitly cross-reference when to use which, eliminating ambiguity.

Naming Consistency5/5

All tools share the stackexchange_ prefix and follow a consistent verb_noun pattern (get_, list_, search_). The naming style is uniform and predictable.

Tool Count5/5

Five tools is well-scoped for a read-only Stack Exchange client. Each tool covers a distinct, necessary operation without redundancy or bloat.

Completeness5/5

The tool surface covers the full read-only workflow: discover sites, search questions, retrieve tag FAQs, fetch full threads with answers, and inspect user profiles. No significant gaps remain for the intended domain.