list_proudnet_sections
Retrieve main sections of ProudNet networking library documentation to navigate and access specific content areas.
Instructions
List main sections of ProudNet documentation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:213-280 (handler)The handler function that scrapes navigation links from ProudNet documentation websites (docs.proudnet.com, guide.nettention.com, help.nettention.com) to list main sections, formats them, and returns as MCP content.async listSections() { try { const urls = [ 'https://docs.proudnet.com/proudnet', 'https://guide.nettention.com', 'https://help.nettention.com' ]; const allSections = []; for (const url of urls) { try { const response = await axios.get(url); const $ = cheerio.load(response.data); const sections = []; // Find navigation or main sections $('.nav-link, .sidebar a, nav a, [class*="menu"] a').each((_, elem) => { const text = $(elem).text().trim(); const href = $(elem).attr('href'); if (text && href && !sections.find(s => s.title === text)) { let fullPath = href; if (!href.startsWith('http')) { if (href.startsWith('/')) { const baseUrl = new URL(url); fullPath = `${baseUrl.origin}${href}`; } else { fullPath = `${url}/${href}`; } } sections.push({ title: text, path: fullPath, source: url, }); } }); allSections.push({ site: url, sections: sections.slice(0, 10) }); } catch (siteError) { console.error(`Failed to get sections from ${url}: ${siteError.message}`); } } const formattedSections = allSections.map(site => `From ${site.site}:\n${site.sections.map(s => `- ${s.title}: ${s.path}` ).join('\n')}` ).join('\n\n'); return { content: [ { type: 'text', text: `Documentation Sections:\n\n${formattedSections}`, }, ], }; } catch (error) { throw new Error(`Failed to list sections: ${error.message}`); } }
- server.js:58-65 (registration)Tool registration in the ListTools response, including name, description, and input schema (no required parameters).{ name: 'list_proudnet_sections', description: 'List main sections of ProudNet documentation', inputSchema: { type: 'object', properties: {}, }, },
- server.js:61-64 (schema)Input schema definition for the tool: an empty object (no parameters required).inputSchema: { type: 'object', properties: {}, },
- server.js:81-82 (handler)Dispatch case in the CallToolRequest handler that invokes the listSections method.case 'list_proudnet_sections': return await this.listSections();