Skip to main content
Glama
WaterSippin

OSRS MCP Server

Official
by WaterSippin

osrs_wiki_search

Search the Old School RuneScape Wiki for specific terms, retrieve relevant pages, and control result limits and pagination for precise data access.

Instructions

Search the OSRS Wiki for pages matching a search term.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of results to return (1-50)
offsetNoOffset for pagination (0-based)
searchYesThe term to search for on the OSRS Wiki

Implementation Reference

  • The handler function for the 'osrs_wiki_search' tool. Parses input arguments using Zod schema, makes an API request to the OSRS Wiki search endpoint with configurable limit and offset, and returns the search results.
    case "osrs_wiki_search": const wikiSearchArgs = getSchemaForTool(name).parse(args) as { search: string; limit?: number; offset?: number }; const { search, limit = 10, offset = 0 } = wikiSearchArgs; const searchResponse = await osrsApiClient.get('', { params: { action: 'query', list: 'search', srsearch: search, srlimit: limit, sroffset: offset, srprop: 'snippet|titlesnippet|sectiontitle' } }); return responseToString(searchResponse.data);
  • Zod schema defining the input parameters for the osrs_wiki_search tool: required 'search' string, optional 'limit' (1-50), and 'offset' (0+).
    const OsrsWikiSearchSchema = z.object({ search: z.string().describe("The term to search for on the OSRS Wiki"), limit: z.number().int().min(1).max(50).optional().describe("Number of results to return (1-50)"), offset: z.number().int().min(0).optional().describe("Offset for pagination (0-based)") });
  • index.ts:302-304 (registration)
    Tool registration in the listTools response: defines the tool name and description for discovery.
    name: "osrs_wiki_search", description: "Search the OSRS Wiki for pages matching a search term.", },
  • index.ts:260-260 (registration)
    Registers the JSON schema for the tool in getToolSchemas() used for tool call validation.
    osrsWikiSearch: convertZodToJsonSchema(OsrsWikiSearchSchema),
  • Schema lookup in getSchemaForTool() switch statement, returns the Zod schema for validation during tool execution.
    case "osrs_wiki_search": return OsrsWikiSearchSchema;

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/WaterSippin/mcp-osrs'

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