Skip to main content
Glama
cryppadotta
by cryppadotta

read_page

Fetch raw wikitext content from Wizzypedia pages to access and work with article source material directly.

Instructions

Fetch the raw wikitext content of a page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the page to read

Implementation Reference

  • Handler function for executing the read_page tool. Extracts title from arguments, calls wikiClient.getPage(title), processes the result to extract content and metadata, handles missing pages, and returns formatted JSON response.
    case "read_page": {
      const { title } = request.params.arguments as { title: string };
      const result = await wikiClient.getPage(title);
    
      const pages = result.query.pages;
      const page = pages[0];
    
      if (page.missing) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                {
                  title: page.title,
                  exists: false,
                  message: "Page does not exist"
                },
                null,
                2
              )
            }
          ]
        };
      }
    
      const revision = page.revisions[0];
      const content = revision.slots.main.content;
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              {
                title: page.title,
                content: content,
                lastEdit: {
                  timestamp: revision.timestamp,
                  user: revision.user,
                  comment: revision.comment
                }
              },
              null,
              2
            )
          }
        ]
      };
    }
  • Tool definition including name, description, and input schema for read_page tool, which requires a 'title' string.
    const READ_PAGE_TOOL: Tool = {
      name: "read_page",
      description: "Fetch the raw wikitext content of a page",
      inputSchema: {
        type: "object",
        properties: {
          title: {
            type: "string",
            description: "Title of the page to read"
          }
        },
        required: ["title"]
      }
    };
  • index.ts:598-607 (registration)
    Registration of all tools including read_page (READ_PAGE_TOOL) in the ListToolsRequestSchema handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        SEARCH_PAGES_TOOL,
        READ_PAGE_TOOL,
        CREATE_PAGE_TOOL,
        UPDATE_PAGE_TOOL,
        GET_PAGE_HISTORY_TOOL,
        GET_CATEGORIES_TOOL
      ]
    }));
  • MediaWikiClient.getPage method: makes API call to query revisions of a page by title, retrieving content, timestamp, user, and comment.
    async getPage(title: string): Promise<any> {
      return this.makeApiCall({
        action: "query",
        prop: "revisions",
        titles: title,
        rvprop: "content|timestamp|user|comment",
        rvslots: "main"
      });
    }
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 ('fetch raw wikitext') but doesn't describe any behavioral traits like error handling (e.g., what happens if the page doesn't exist), performance characteristics, authentication requirements, or rate limits. For a read operation with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves in practice.

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 a single, efficient sentence that immediately communicates the core functionality without any wasted words. It's front-loaded with the essential information and there's no unnecessary elaboration. Every word earns its place in this compact description.

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?

Given the tool's simplicity (single parameter, read-only operation) and 100% schema coverage, the description is adequate but incomplete. It lacks output information (no output schema exists), doesn't mention error cases or behavioral constraints, and provides minimal context about when to use it. For a basic read tool, it meets minimum requirements but doesn't provide the completeness needed for optimal agent understanding.

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 has 100% description coverage, with the single parameter 'title' clearly documented in the schema. The description doesn't add any parameter-specific information beyond what the schema provides (it doesn't explain formatting, constraints, or examples for the title parameter). With high schema coverage, the baseline score of 3 is appropriate since the schema does the heavy lifting.

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 ('fetch') and resource ('raw wikitext content of a page'), making the purpose immediately understandable. It distinguishes from siblings like 'get_page_history' (historical data) and 'search_pages' (searching), though it doesn't explicitly mention these alternatives. The verb+resource combination is specific but could be more precise about what distinguishes it from similar read operations.

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

Usage Guidelines3/5

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

The description implies usage when raw wikitext is needed, but provides no explicit guidance on when to use this tool versus alternatives like 'get_categories' or 'search_pages'. There's no mention of prerequisites, error conditions, or typical use cases. The context is clear from the description alone, but lacks the explicit when/when-not guidance that would elevate the score.

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/cryppadotta/mcp-wizzypedia'

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