get_on_page_seo_guide
Access the OSP On-Page SEO Optimization Guide to optimize web content with meta tags, keyword research, content depth, search intent alignment, internal linking, and structured data.
Instructions
Get the Open Strategy Partners (OSP) On-Page SEO Optimization Guide for comprehensive web content optimization, covering meta content, keyword research, content depth, search intent alignment, internal linking, and structured data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/index.ts:150-174 (handler)Handler function that reads the 'on-page-seo-guide.md' file using ContentReader, returns its content in MCP format on success, or an error response on failure.async (_extra) => { try { const content = await contentReader.readMarkdownFile('on-page-seo-guide.md'); return { content: [{ type: "text", text: JSON.stringify({ success: true, data: { content } }) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ success: false, error: error instanceof Error ? error.message : String(error) }) }], isError: true }; } }
- src/tools/index.ts:147-175 (registration)Registers the 'get_on_page_seo_guide' tool with the MCP server inside the registerTools function.server.tool( "get_on_page_seo_guide", "Get the Open Strategy Partners (OSP) On-Page SEO Optimization Guide for comprehensive web content optimization, covering meta content, keyword research, content depth, search intent alignment, internal linking, and structured data.", async (_extra) => { try { const content = await contentReader.readMarkdownFile('on-page-seo-guide.md'); return { content: [{ type: "text", text: JSON.stringify({ success: true, data: { content } }) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ success: false, error: error instanceof Error ? error.message : String(error) }) }], isError: true }; } } );
- src/utils/contentReader.ts:14-32 (helper)Supporting method in ContentReader class to asynchronously read and cache markdown files, used by the tool handler to load the SEO guide content.async readMarkdownFile(filename: string): Promise<string> { // Check cache if (this.cache.has(filename)) { return this.cache.get(filename)!; } try { const filePath = join(this.resourcesDir, filename); const content = await readFile(filePath, 'utf-8'); // Store in cache this.cache.set(filename, content); return content; } catch (error) { console.error(`Error reading file ${filename}:`, error); throw new Error(`Required file '${filename}' not found`); } }