Skip to main content
Glama
urldna

urlDNA MCP Server

Official
by urldna

search

Query urlDNA threat intelligence scans using custom search syntax to filter by domain, IP, URL, device, country, technology, and security status for security analysis.

Instructions

Search scans using urlDNA custom search syntax.

Searchable fields include: domain, ip, submitted_url, target_url, device, country_code, title, technology, favicon, malicious, and many more.

Operators supported: =, !=, LIKE, !LIKE, >, >=, <, <=

Examples: - domain = www.google.com AND title LIKE search - device = MOBILE AND country_code = IT - malicious = false AND technology LIKE wordpress

Args: query (str): Query in urlDNA CQL syntax. Returns: dict: List of scan. Raises: RuntimeError: If ssearch fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • The full implementation of the 'search' tool handler, registered via @mcp.tool() within the register_search function. It handles the query by calling the urlDNA API search endpoint.
    def register_search(mcp):
    
        @mcp.tool()
        def search(query: str):
            """
            Search scans using urlDNA custom search syntax.
    
            Searchable fields include: domain, ip, submitted_url, target_url, device, country_code, title, technology, favicon, malicious, and many more.
    
            Operators supported: =, !=, LIKE, !LIKE, >, >=, <, <=
    
            Examples:
                - domain = www.google.com AND title LIKE search
                - device = MOBILE AND country_code = IT
                - malicious = false AND technology LIKE wordpress
    
            Args:
                query (str): Query in urlDNA CQL syntax.
            Returns:
                dict: List of scan.
            Raises:
                RuntimeError: If ssearch fails.
            """
            # Get urlDNA API key 
            try:
                urlDNA_api_key = get_api_key()
            except Exception as e:
                raise RuntimeError(f"[new_scan] Failed to retrieve API key: {e}")
    
            headers = {
                "Authorization": urlDNA_api_key,
                "Content-Type": "application/json",
                "User-Agent": "urlDNA-MCP"
            }
    
            # Perform the search request
            res = requests.post(
                f"{config.urlDNA_API_URL}/search",
                json={"query": query},
                headers=headers
            )
    
            if not res.ok:
                raise RuntimeError(f"Search failed: {res.status_code} - {res.text}")
    
            return res.json()
  • Registration of the search tool (via register_search(mcp)) along with other tools in the FastMCP SSE server.
    register_new_scan(mcp)
    register_get_scan(mcp)
    register_search(mcp)
    register_fast_check(mcp)
  • Registration of the search tool (via register_search(mcp)) along with other tools in the FastMCP stdio server.
    register_new_scan(mcp)
    register_get_scan(mcp)
    register_search(mcp)
    register_fast_check(mcp)
  • Docstring providing input schema (query: str in CQL syntax), output (dict of scans), examples, and fields for the search tool.
    """
    Search scans using urlDNA custom search syntax.
    
    Searchable fields include: domain, ip, submitted_url, target_url, device, country_code, title, technology, favicon, malicious, and many more.
    
    Operators supported: =, !=, LIKE, !LIKE, >, >=, <, <=
    
    Examples:
        - domain = www.google.com AND title LIKE search
        - device = MOBILE AND country_code = IT
        - malicious = false AND technology LIKE wordpress
    
    Args:
        query (str): Query in urlDNA CQL syntax.
    Returns:
        dict: List of scan.
    Raises:
        RuntimeError: If ssearch fails.
    """
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 tool returns a 'List of scan' and raises a 'RuntimeError' on failure, which adds some context. However, it lacks details on permissions, rate limits, pagination, or what happens in edge cases (e.g., no results). For a search tool with zero annotation coverage, 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.

Conciseness4/5

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

The description is appropriately sized and front-loaded, starting with the core purpose. Each section (searchable fields, operators, examples, args, returns, raises) adds value without redundancy. However, the 'Raises' section could be integrated more smoothly, and the structure is slightly fragmented with bullet points and separate headings.

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?

Given the complexity of a search tool with 1 parameter, no annotations, and no output schema, the description is moderately complete. It covers the query syntax and examples well but lacks details on output format (beyond 'List of scan'), error handling specifics, or integration with sibling tools. For a tool with no structured output, more guidance on return values would improve completeness.

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

Parameters4/5

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

The description adds substantial meaning beyond the input schema, which has 0% coverage and only lists 'query' as a string. It explains that the query uses 'urlDNA CQL syntax,' lists searchable fields (e.g., domain, ip), supported operators (e.g., =, LIKE), and provides examples. This compensates well for the low schema coverage, though it could clarify the exact syntax format or constraints.

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 as 'Search scans using urlDNA custom search syntax,' which is a specific verb (search) and resource (scans). It distinguishes itself from siblings like 'fast_check,' 'get_scan,' and 'new_scan' by focusing on query-based searching rather than quick checks, retrieval, or creation. However, it could be more precise by explicitly mentioning it searches through existing scans in a database or system.

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

Usage Guidelines3/5

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

The description implies usage by providing examples and searchable fields, suggesting it's for querying scans based on specific criteria. However, it lacks explicit guidance on when to use this tool versus alternatives like 'fast_check' (likely for quick checks) or 'get_scan' (likely for retrieving a single scan by ID). No exclusions or prerequisites are mentioned, leaving the agent to infer context from the examples.

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/urldna/mcp'

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