Skip to main content
Glama
linuxdo-mcp
by Xero-Team

Read a linux.do topic

get_topic
Read-onlyIdempotent

Reads a forum topic and its posts as text, paging through long threads by post number and returning headers, post windows, images, and truncation flags for discussion review.

Instructions

Read one topic with its posts as text.

Returns the header plus one window of posts. To read the rest of a long topic, pass next_post_number back as post_number; it is null once the window reaches the last post. Windows overlap rather than skip, so a caller may see a few posts twice.

post_ids and post_number are two ways to name the same window: ids are exact, a post number gets whichever window contains it. For a single known post, prefer get_post: it makes one request instead of a header plus a window.

Each post carries images in document order, and truncated when its body hit max_post_chars.

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": {
      "topic_id": "<topic_id>"
    },
    "name": "get_topic"
  }
}

Input Schema

NameRequiredDescriptionDefault
post_idsNoSpecific post ids to read instead of the default first window. Take them from a previous get_topic stream or a post URL.
topic_idYesTopic id from browse_topics.
include_rawNoReturn Discourse's own Markdown instead of cooked HTML reduced to text. About half the characters and keeps tables and link targets; turn it off only if you want the simplified text.
post_numberNoRead the window containing this post number (楼号). Pass the previous read's next_post_number to walk a long topic forward.
max_post_charsNoCut each body at this many characters and set that post's truncated when it was cut. The cap is per post, not per window.

Output Schema

NameRequiredDescriptionDefault
idYesTopic id.
slugYesURL slug. Forum titles are almost always Chinese, so Discourse falls back to the literal 'topic'; build links from id instead of slug.
tagsNoTag names, in upstream order; pass one to browse_topics(tag=...) or sort=filter. Empty means the topic carries no tags.
postsYesEmbedded posts, in topic order.
titleYesTopic title.
chunk_sizeYesHow many posts this response embedded.
created_atYesISO 8601 creation timestamp.
category_idNoDiscourse category id.
posts_countYesTotal posts in the topic.
stream_lengthYesPost ids in the topic's full stream, including slots for deleted posts; it can differ from posts_count by a few. Compare with highest_post_number, not this, to tell whether more calls remain.
next_post_numberNoPass back as `post_number` to read the window after these posts; null when this window reaches the last post. For a `post_ids` read it is derived from the highest requested post number, so it continues by position, not by id.
highest_post_numberNoHighest post number (楼号) in the topic. Deleted posts leave holes, so this exceeds the visible post count; it is the real end of the walk, while next_post_number is the cursor short of it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so the safety profile is covered; the description then genuinely adds window/pagination behavior: overlapping windows mean a caller may see a few posts twice, and next_post_number is null at the end. That overlap disclosure is the kind of context annotations cannot carry, though it says nothing about auth, rate limits, or error behavior.

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?

Front-loaded with the core action, then window mechanics, then the sibling alternative, then per-post fields. Every sentence carries information, including the overlap caveat, and there is no restating of the tool name or schema boilerplate.

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?

For a five-parameter paginated read with an output schema present, the definition supplies everything needed to call it correctly and iterate: how to continue, when to stop, why duplicates appear, and which per-post fields to expect. Return-value explanation is not required given the output schema, yet key fields are still flagged.

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 100%, so the baseline is 3, but the description adds real meaning the schema only hints at: post_ids and post_number 'are two ways to name the same window' with ids exact and post numbers resolving to a containing window, plus the next_post_number round-trip. It also frames images and truncated as per-post outputs tied to max_post_chars.

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 and resource ('Read one topic with its posts as text') and draws the line against the sibling get_post ('For a single known post, prefer get_post'). The first line plus the window explanation makes it unmistakable what this tool returns versus a discovery tool like browse_topics.

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?

Gives clear routing guidance: use get_post for a single known post because it makes one request instead of a header plus a window, and explains when to use post_ids versus post_number. It stops short of stating when not to use this tool at all (e.g. discovery/listing), so it is clear context rather than a full when/when-not map.

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