mmnt_cache
Retrieve a cached webpage from Mamont search engine using a unique cache ID, with an option to return only text content.
Instructions
Extract page from Mamont cache
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | unique cache id | |
| onlyText | Yes | Should the result be text only (no html) |
Implementation Reference
- src/mmnt/cache.ts:10-10 (handler)The main handler function 'extractCache' that fetches a page from Mamont cache by ID, decodes it from Windows-1251, and optionally extracts text-only content via cheerio.
export async function extractCache(id: string, onlyText: boolean = true): Promise<string> { - src/types.ts:18-21 (schema)CacheParams schema defining input validation for the 'mmnt_cache' tool: 'id' (string) and 'onlyText' (boolean).
export const CacheParams = { id: z.string({description: "unique cache id"}), onlyText: z.boolean({description: "Should the result be text only (no html)"}) }; - src/index.ts:27-37 (registration)Registration of the 'mmnt_cache' tool via server.tool(), connecting the schema (CacheParams) to the handler (extractCache).
server.tool( "mmnt_cache", "Extract page from Mamont cache", CacheParams, async ({id, onlyText}) => ({ content: [{ type: "text", text: JSON.stringify(await extractCache(id, onlyText)) }] }) );