Skip to main content
Glama
yokingma

OneSearch MCP Server

one_map

Discover URLs from a starting point using sitemap.xml and HTML link discovery to map website structure and find relevant pages.

Instructions

Discover URLs from a starting point. Can use both sitemap.xml and HTML link discovery.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesStarting URL for URL discovery
searchNoOptional search term to filter URLs
ignoreSitemapNoSkip sitemap.xml discovery and only use HTML links
sitemapOnlyNoOnly use sitemap.xml for discovery, ignore HTML links
includeSubdomainsNoInclude URLs from subdomains in results
limitNoMaximum number of URLs to return

Implementation Reference

  • Core handler function for 'one_map' tool: invokes Firecrawl's mapUrl to discover URLs from a starting point and returns formatted list of links.
    async function processMapUrl(url: string, args: MapParams) {
      const res = await firecrawl.mapUrl(url, {
        ...args,
      });
    
      if ('error' in res) {
        throw new Error(`Failed to map: ${res.error}`);
      }
    
      if (!res.links) {
        throw new Error(`No links found from: ${url}`);
      }
    
      return {
        content: [
          {
            type: 'text',
            text: res.links.join('\n').trim(),
          },
        ],
        result: res.links,
        success: true,
      };
    }
  • Tool schema definition for 'one_map', including input schema for parameters like url, search, limit, etc.
    export const MAP_TOOL: Tool = {
      name: 'one_map',
      description:
        'Discover URLs from a starting point. Can use both sitemap.xml and HTML link discovery.',
      inputSchema: {
        type: 'object',
        properties: {
          url: {
            type: 'string',
            description: 'Starting URL for URL discovery',
          },
          search: {
            type: 'string',
            description: 'Optional search term to filter URLs',
          },
          ignoreSitemap: {
            type: 'boolean',
            description: 'Skip sitemap.xml discovery and only use HTML links',
          },
          sitemapOnly: {
            type: 'boolean',
            description: 'Only use sitemap.xml for discovery, ignore HTML links',
          },
          includeSubdomains: {
            type: 'boolean',
            description: 'Include URLs from subdomains in results',
          },
          limit: {
            type: 'number',
            description: 'Maximum number of URLs to return',
          },
        },
        required: ['url'],
      },
    };
  • src/index.ts:66-73 (registration)
    Registers MAP_TOOL (one_map) in the server's listTools handler response.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        SEARCH_TOOL,
        EXTRACT_TOOL,
        SCRAPE_TOOL,
        MAP_TOOL,
      ],
    }));
  • Dispatcher case in CallToolRequest handler that validates args and invokes processMapUrl for 'one_map'.
    case 'one_map': {
      if (!checkMapArgs(args)) {
        throw new Error(`Invalid arguments for tool: [${name}]`);
      }
      try {
        const { content, success, result } = await processMapUrl(args.url, args);
        return {
          content,
          result,
          success,
        };
      } catch (error) {
        server.sendLoggingMessage({
          level: 'error',
          data: `[${new Date().toISOString()}] Error mapping: ${error}`,
        });
        const msg = error instanceof Error ? error.message : String(error);
        return {
          success: false,
          content: [
            {
              type: 'text',
              text: msg,
            },
          ],
        };
      }
    }
  • Helper function to validate arguments for the 'one_map' tool.
    function checkMapArgs(args: unknown): args is MapParams & { url: string } {
      return (
        typeof args === 'object' &&
        args !== null &&
        'url' in args &&
        typeof args.url === 'string'
      );
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the discovery methods but lacks critical details: it doesn't specify whether this is a read-only operation, potential rate limits, authentication needs, or what happens if the starting URL is invalid. For a tool with 6 parameters and no annotations, this is a significant gap in transparency.

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 extremely concise with just two sentences that directly state the tool's purpose and methods. It's front-loaded with the core function and wastes no words, making it easy to parse quickly.

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

Completeness2/5

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

Given the tool's complexity (6 parameters, no output schema, and no annotations), the description is incomplete. It doesn't explain return values, error handling, or behavioral constraints like rate limits or permissions. For a discovery tool with multiple configuration options, more context is needed to guide effective use.

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%, so the schema fully documents all 6 parameters. The description adds minimal value beyond the schema by implying the tool uses sitemap.xml and HTML links, which relates to parameters like ignoreSitemap and sitemapOnly, but doesn't provide additional syntax or format details. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose4/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: 'Discover URLs from a starting point' with the specific methods 'sitemap.xml and HTML link discovery'. It uses a clear verb ('Discover') and resource ('URLs'), but doesn't explicitly differentiate from sibling tools like one_search or one_scrape, which might have overlapping functionality.

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?

The description provides no guidance on when to use this tool versus alternatives like one_search or one_scrape. It mentions the methods (sitemap.xml and HTML links) but doesn't specify scenarios where this tool is preferred over siblings, nor does it mention prerequisites or exclusions.

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/yokingma/one-search-mcp'

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