Skip to main content
Glama
shiquda

mediawiki-mcp-server

get_page

Retrieve page content from MediaWiki sites like Wikipedia and Fandom by specifying the page title.

Instructions

Get a page from mediawiki.org Args: title: The title of the page to get, which can be found in title field of the search results Returns: The page content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes

Implementation Reference

  • The main handler function for the 'get_page' tool. It is decorated with @mcp.tool() for registration and uses the make_request helper to fetch the page content from the MediaWiki API given the page title.
    @mcp.tool()
    async def get_page(title: str):
        """Get a page from mediawiki.org
        Args:
            title: The title of the page to get, which can be found in title field of the search results
        Returns:
            The page content
        """
        path = f"page/{title}"
        response = await make_request(path, {})
        return response
  • Docstring providing the input schema (title: str) and output description for the get_page tool, used by FastMCP for validation.
    """Get a page from mediawiki.org
    Args:
        title: The title of the page to get, which can be found in title field of the search results
    Returns:
        The page content
  • Supporting helper function that performs the actual HTTP request to the MediaWiki API, handling proxies, redirects, and errors. Invoked by the get_page handler.
    async def make_request(path: str, params: dict) -> httpx.Response:
        headers = {
            "User-Agent": USER_AGENT,
        }
        url = config.base_url + config.path_prefix + path
        proxies = get_proxy_settings()
        async with httpx.AsyncClient(proxies=proxies, follow_redirects=True) as client:
            try:
                response = await client.get(url, headers=headers, params=params)
                if response.status_code in (301, 302, 303, 307, 308):
                    final_response = await client.get(
                        response.headers["Location"], headers=headers
                    )
                    return final_response.json()
                return response.json()
            except httpx.HTTPStatusError as e:
                logger.error(e)
                return {"error": e}
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does (retrieves page content) but lacks critical behavioral details such as authentication requirements, rate limits, error handling, or whether it's a read-only operation (though implied by 'Get'). This leaves significant gaps for an agent to understand operational constraints.

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 efficiently structured with a clear purpose statement followed by labeled sections for Args and Returns. Every sentence adds value without redundancy, making it easy to parse and understand quickly.

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?

For a simple read operation with one parameter and no output schema, the description covers the basics (purpose, parameter hint, return type). However, without annotations or output schema, it lacks details on response format (e.g., structured data vs. raw text), error cases, or prerequisites, leaving some contextual gaps for reliable agent use.

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?

The description adds meaningful context for the single parameter 'title' by explaining that it 'can be found in title field of the search results,' which clarifies its source and usage. Since schema description coverage is 0% and there's only one parameter, this compensates well, though it doesn't detail format constraints like case sensitivity or special characters.

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?

The description clearly states the action ('Get a page') and resource ('from mediawiki.org'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from the sibling 'search' tool, which appears to be a related but distinct operation for finding pages rather than retrieving specific content.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like the 'search' sibling. It mentions that titles 'can be found in title field of the search results,' which hints at a workflow but doesn't explicitly state when to choose get_page over search or other potential tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shiquda/mediawiki-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server