Skip to main content
Glama

get-random-pages

Read-onlyIdempotent

Returns randomly selected wiki pages from a chosen namespace, including titles, page IDs, and namespace IDs, for random sampling or discovery; pass titles to get-pages to fetch content.

Instructions

Returns randomly chosen wiki pages from one namespace, as each page's title, page ID, and namespace ID; the API counterpart of Special:Random. One call's pages are a fair random sample; separate calls can overlap because they read the same ordering from different starting points. There is no continuation; each call picks a new starting point. For page content, pass the titles to get-pages.

Input Schema

NameRequiredDescriptionDefault
wikiNoWiki to target, as a key from the mcp://wikis/ resources (e.g. en.wikipedia.org), or the full mcp://wikis/ URI. Omit to use the default wiki.
limitNoNumber of wiki pages to draw (1..500)
filterNoFilter the drawn wiki pages by redirect statusnonredirects
namespaceNoNamespace ID to draw wiki pages from

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.21.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnly/destructive annotations, it discloses the two non-obvious behaviors that actually trip agents up: separate calls can overlap because they start at different points in the same ordering, and there is no continuation token. It also characterises sample quality ("a fair random sample"). The per-call variation is a data-freshness property, not a side effect, so this does not contradict idempotentHint=true.

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?

Four short sentences, front-loaded with what is returned, then the sampling caveat, then the no-continuation warning, then the follow-up route. Every sentence prevents a distinct agent error; nothing is redundant with the schema.

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?

With no output schema, the description compensates by enumerating the returned fields, and it covers the sampling/pagination semantics an agent needs to call it correctly. Nothing material is missing for a 4-parameter read tool with full annotation coverage.

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?

Schema description coverage is 100%, so wiki, limit, filter, and namespace are already documented in the schema, and the description adds little beyond confirming that pages come from a single namespace. The redirect filter and the 1..500 limit bound are left entirely to the schema. Baseline 3 applies when the schema carries the parameter burden.

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 ("Returns randomly chosen wiki pages from one namespace"), names the exact return fields (title, page ID, namespace ID), and anchors the behavior to a well-known counterpart (Special:Random). It also routes the agent to get-pages for content, so it is clearly distinguishable from the sibling read tools.

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 when-to-use context (want a random sample) and an explicit hand-off for the follow-up need ("For page content, pass the titles to get-pages"). It does not contrast against search-page or get-recent-changes, so the agent must infer that this is not a substitute for search, but the primary routing decision is covered.

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