Skip to main content
Glama
miroslawfranek

Open-E JovianDSS REST API Documentation MCP Server

discover_documentation_links

Parse the dh.lan homepage to list all available EDSS documentation links.

Instructions

Discover all available EDSS documentation by parsing dh.lan homepage

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refreshNoForce refresh discovery cache

Implementation Reference

  • The discoverLinks method is the direct handler for the 'discover_documentation_links' tool call. It accepts optional 'refresh' boolean, clears cache if requested, calls discoverDocumentationLinks(), and returns JSON with discovered links, timestamp, and count.
    async discoverLinks(args) {
      const refresh = args?.refresh || false;
      
      if (refresh) {
        this.discoveredLinks = null;
        this.lastDiscovery = null;
      }
      
      const links = await this.discoverDocumentationLinks();
      
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              links: links,
              discoveredAt: new Date().toISOString(),
              totalFound: Object.keys(links).length
            }, null, 2)
          }
        ]
      };
    }
  • The tool registration with its input schema. Defines the tool name, description, and accepts an optional 'refresh' boolean parameter.
    {
      name: "discover_documentation_links",
      description: "Discover all available EDSS documentation by parsing dh.lan homepage",
      inputSchema: {
        type: "object",
        properties: {
          refresh: {
            type: "boolean",
            default: false,
            description: "Force refresh discovery cache"
          }
        }
      }
    },
  • index.js:198-199 (registration)
    The switch-case mapping that routes the 'discover_documentation_links' tool name to the discoverLinks handler method.
    case "discover_documentation_links":
      return await this.discoverLinks(args);
  • The core discovery logic: checks cache (10-min TTL), fetches the dh.lan homepage HTML, calls parseDocumentationLinks() to extract links, caches results, and falls back to buildLegacyLinks() on failure.
    async discoverDocumentationLinks() {
      // Check cache first
      if (this.discoveredLinks && this.lastDiscovery && 
          (Date.now() - this.lastDiscovery) < this.cacheTimeout) {
        return this.discoveredLinks;
      }
    
      try {
        const response = await fetch(this.baseUrl);
        if (!response.ok) {
          throw new Error(`Failed to fetch homepage: ${response.status}`);
        }
        
        const html = await response.text();
        const links = this.parseDocumentationLinks(html);
        
        // Cache the results
        this.discoveredLinks = links;
        this.lastDiscovery = Date.now();
        
        return links;
      } catch (error) {
        console.error('Discovery failed, using legacy URLs:', error.message);
        return this.buildLegacyLinks();
      }
    }
  • Helper that parses the homepage HTML using a regex to find anchor tags with documentation URLs, extracts release/version info, constructs full URLs and ZIP download links, and creates aliases for non-trunk releases.
    parseDocumentationLinks(html) {
      const links = {};
      
      // Updated regex to match relative URLs without leading slash
      const linkRegex = /<a[^>]+href="([^"]*docs\/EDSS[^"]*documentation\/v[34][^"]*?)"[^>]*>([^<]*)<\/a>/gi;
      let match;
      
      while ((match = linkRegex.exec(html)) !== null) {
        const url = match[1];
        const linkText = match[2].trim();
        
        // Parse the URL to extract version and release info
        const urlMatch = url.match(/docs\/EDSS\/([^\/]+)\/documentation\/(v[34])\/?$/);
        if (urlMatch) {
          const release = urlMatch[1];
          const apiVersion = urlMatch[2];
          
          // Construct full URL (add leading slash if missing)
          const fullUrl = url.startsWith('http') ? url : `${this.baseUrl}${url.startsWith('/') ? url.slice(1) : url}`;
          const zipUrl = fullUrl + (fullUrl.endsWith('/') ? '' : '/') + 'get_doc.php?t=zip';
          
          const key = `${release.toLowerCase()}_${apiVersion}`;
          links[key] = {
            url: fullUrl,
            zipUrl: zipUrl,
            release: release,
            apiVersion: apiVersion,
            linkText: linkText,
            discovered: true
          };
          
          // Create aliases for latest
          if (release !== 'trunk') {
            const aliasKey = `latest_${apiVersion}`;
            links[aliasKey] = { ...links[key] };
          }
        }
      }
      
      return links;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden for behavioral transparency. It mentions parsing a homepage to discover links, implying a read operation, but does not confirm that it is non-destructive, disclose caching behavior (though hinted by the 'refresh' parameter in schema), or address any side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that immediately conveys the tool's purpose. It is front-loaded, efficient, and contains no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description adequately explains the action and resource, but it lacks details about the output format or structure (no output schema provided). Given the simplicity of the tool (one optional parameter), the description is minimally complete but could benefit from specifying what the discovered links look like.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the single boolean parameter 'refresh', so the description does not need to add meaning. It provides no additional context about the parameter beyond what the schema already offers, which is acceptable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: discovering all available EDSS documentation by parsing the dh.lan homepage. It uses a specific verb ('discover') and resource ('EDSS documentation links'), and distinguishes itself from sibling tools like search_edss_documentation or download_edss_documentation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus its siblings, such as search_edss_documentation or get_edss_documentation. There are no explicit conditions, exclusions, or alternative recommendations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/miroslawfranek/JDSS-REST-Documentation-MCP'

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