Skip to main content
Glama
Nettention

ProudNet Document MCP

Official
by Nettention

get_proudnet_page

Retrieve content from specific ProudNet documentation pages to access detailed information about the networking library's features and usage.

Instructions

Get content from a specific ProudNet documentation page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the documentation page (e.g., /guides/getting-started)

Implementation Reference

  • The 'getPage' method implements the core logic of the 'get_proudnet_page' tool. It constructs the URL based on the input path, fetches the page using axios, parses it with cheerio, extracts main content and code blocks, and returns formatted text content.
    async getPage(path) { try { let url; if (path.startsWith('http')) { url = path; } else { // Default to docs.proudnet.com if no domain is specified if (path.includes('guide.nettention.com') || path.includes('help.nettention.com')) { url = path.startsWith('/') ? `https:/${path}` : `https://${path}`; } else { url = `https://docs.proudnet.com${path.startsWith('/') ? path : '/' + path}`; } } const response = await axios.get(url); const $ = cheerio.load(response.data); // Remove script and style elements $('script, style').remove(); // Extract main content const content = $('.content, main, article, [role="main"]').first(); const text = content.length > 0 ? content.text().trim() : $('body').text().trim(); // Extract code examples const codeBlocks = []; $('pre code, .highlight').each((_, elem) => { codeBlocks.push($(elem).text().trim()); }); return { content: [ { type: 'text', text: `Content from ${url}:\n\n${text.substring(0, 3000)}${text.length > 3000 ? '...' : ''}${ codeBlocks.length > 0 ? '\n\nCode Examples:\n' + codeBlocks.slice(0, 3).join('\n---\n') : '' }`, }, ], }; } catch (error) { throw new Error(`Failed to get page: ${error.message}`); } }
  • server.js:44-57 (registration)
    Registration of the 'get_proudnet_page' tool in the ListToolsRequestHandler response, including name, description, and input schema definition.
    { name: 'get_proudnet_page', description: 'Get content from a specific ProudNet documentation page', inputSchema: { type: 'object', properties: { path: { type: 'string', description: 'Path to the documentation page (e.g., /guides/getting-started)', }, }, required: ['path'], }, },
  • server.js:78-80 (registration)
    The switch case in CallToolRequestHandler that routes calls to 'get_proudnet_page' to the 'getPage' method.
    case 'get_proudnet_page': return await this.getPage(args.path);
  • Input schema definition for the 'get_proudnet_page' tool, specifying the required 'path' parameter.
    inputSchema: { type: 'object', properties: { path: { type: 'string', description: 'Path to the documentation page (e.g., /guides/getting-started)', }, }, required: ['path'], },

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/Nettention/proudnet-document-mcp'

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