Skip to main content
Glama

osrs_wiki_search

Search the Old School RuneScape (OSRS) Wiki for pages matching specific terms using a dedicated tool. Retrieve relevant results with customizable limits and pagination offsets for precise queries.

Instructions

Search the OSRS Wiki for pages matching a search term.

Input Schema

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

Input Schema (JSON Schema)

{ "additionalProperties": false, "properties": { "limit": { "description": "Number of results to return (1-50)", "maximum": 50, "minimum": 1, "type": "integer" }, "offset": { "description": "Offset for pagination (0-based)", "minimum": 0, "type": "integer" }, "search": { "description": "The term to search for on the OSRS Wiki", "type": "string" } }, "required": [ "search" ], "type": "object" }

Implementation Reference

  • Handler for osrs_wiki_search: parses input, calls OSRS Wiki API search endpoint, formats and returns response.
    case "osrs_wiki_search": const { search, limit = 10, offset = 0 } = OsrsWikiSearchSchema.parse(args); 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 input schema defining parameters for the osrs_wiki_search tool: search term, optional limit and offset.
    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:243-247 (registration)
    Tool registration in listTools handler, including name, description, and converted input schema.
    { name: "osrs_wiki_search", description: "Search the OSRS Wiki for pages matching a search term.", inputSchema: convertZodToJsonSchema(OsrsWikiSearchSchema), },
  • Axios client instance configured for OSRS Wiki API calls, used by the handler.
    const osrsApiClient = axios.create({ baseURL: 'https://oldschool.runescape.wiki/api.php', params: { format: 'json' } });
  • Utility function to format tool responses into MCP content structure.
    const responseToString = (response: any) => { const contentText = typeof response === 'string' ? response : JSON.stringify(response); return { content: [{ type: "text", text: contentText }] }; };

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

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