Skip to main content
Glama

search_datanexus_tools

Find the right DataNexus tool for your task by describing your need in plain language. Call this first to get matching tool names.

Instructions

Use this to find the right DataNexus tool for your task. Call this FIRST before any other DataNexus tool. Provide a plain-language description of what you need. Returns matching tool names you can call directly.

Examples: search_datanexus_tools("research a nonprofit organisation") search_datanexus_tools("check package for security vulnerabilities") search_datanexus_tools("verify a doctor NPI number") search_datanexus_tools("find government contracts awarded to a vendor") search_datanexus_tools("look up a patent", domain="legal")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
domainNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Async function that implements the search_datanexus_tools meta-tool logic. It tokenizes the query, scores it against the TOOL_REGISTRY task descriptions (optionally filtered by domain prefix), and returns matching tools sorted by relevance. Also increments a Redis analytics counter.
    async def search_datanexus_tools(query: str, domain: Optional[str] = None) -> dict:
        """
        Use this to find the right DataNexus tool for your task.
        Call this FIRST before any other DataNexus tool.
        Provide a plain-language description of what you need.
        Returns matching tool names you can call directly.
    
        Examples:
          search_datanexus_tools("research a nonprofit organisation")
          search_datanexus_tools("check package for security vulnerabilities")
          search_datanexus_tools("verify a doctor NPI number")
          search_datanexus_tools("find government contracts awarded to a vendor")
          search_datanexus_tools("look up a patent", domain="legal")
        """
        # Analytics: INCR daily counter — raw query text is never stored
        analytics_key = f"analytics:search:{date.today().isoformat()}"
        try:
            r = await get_redis()
            if r is not None:
                await r.incr(analytics_key)
        except Exception:
            log.error("analytics_incr_failed key=%s", analytics_key)
    
        query_tokens = _tokenize(query)
        results = []
        for entry in TOOL_REGISTRY:
            if domain and not entry["name"].startswith(f"{domain}_"):
                continue
            score = _score(query_tokens, _tokenize(entry["task"]))
            if score > 0:
                results.append({"name": entry["name"], "task": entry["task"], "score": score})
    
        results.sort(key=lambda x: x["score"], reverse=True)
        log.info("meta_search query_len=%d results=%d", len(query), len(results))
        return {"tools": results}
  • TOOL_REGISTRY — the in-memory list of all 26 DataNexus tools with their name and task description, used as the search corpus by the meta-tool.
    TOOL_REGISTRY = [
        {"name": "nonprofit_fetch_nonprofit_by_ein",         "task": "research a US charity or nonprofit by EIN number"},
        {"name": "nonprofit_search_nonprofits_by_name",      "task": "search for nonprofits or charities by organisation name"},
        {"name": "nonprofit_fetch_charity_uk",               "task": "look up a UK registered charity by number or name"},
        {"name": "security_fetch_package_vulnerabilities",   "task": "check a software package for known CVEs and security vulnerabilities"},
        {"name": "security_fetch_dependency_graph",          "task": "get the full dependency tree for a software package"},
        {"name": "security_fetch_cve_detail",                "task": "get full detail on a specific CVE vulnerability by ID"},
        {"name": "security_audit_sbom_vulnerabilities",      "task": "audit a software bill of materials for known vulnerabilities"},
        {"name": "security_fetch_package_licence",           "task": "check the open source licence for a package version"},
        {"name": "compliance_fetch_npi_provider",            "task": "verify a US healthcare provider by NPI number"},
        {"name": "compliance_search_npi_by_name",            "task": "search for a healthcare provider by name and state"},
        {"name": "compliance_fetch_finra_broker",            "task": "verify a financial broker or advisor registration with FINRA"},
        {"name": "compliance_check_sam_exclusion",           "task": "check whether a person or company is excluded from federal contracting"},
        {"name": "domain_fetch_domain_rdap",                 "task": "look up domain registration and ownership details"},
        {"name": "domain_fetch_ssl_certificate_chain",       "task": "inspect the SSL certificate chain for a domain"},
        {"name": "domain_fetch_dns_records",                 "task": "get DNS records for a domain"},
        {"name": "domain_fetch_domain_history",              "task": "get historical SSL certificate records for a domain"},
        {"name": "legal_fetch_patent_by_number",             "task": "look up a specific patent by number across US EP or WO"},
        {"name": "legal_search_patents_by_keyword",          "task": "search for patents by keyword to find prior art"},
        {"name": "legal_fetch_patent_citations",             "task": "get forward and backward citation chains for a patent"},
        {"name": "legal_fetch_inventor_portfolio",           "task": "get all patents filed by a specific inventor or assignee"},
        {"name": "govcon_search_contract_awards",            "task": "search government contract awards by keyword or agency"},
        {"name": "govcon_fetch_vendor_contract_history",     "task": "get the full government contract history for a specific vendor"},
        {"name": "govcon_fetch_open_solicitations",          "task": "find currently open government procurement opportunities"},
        {"name": "regulatory_search_open_rulemakings",       "task": "find open regulatory rulemakings and comment periods"},
        {"name": "regulatory_fetch_docket_details",          "task": "get full details for a specific regulatory docket by ID"},
        {"name": "regulatory_fetch_federal_register_notices","task": "fetch recent Federal Register notices for an agency"},
    ]
  • Helper function that tokenizes text into lowercase alphanumeric words, excluding stopwords.
    def _tokenize(text: str) -> list[str]:
        return [w for w in re.findall(r"[a-z0-9]+", text.lower()) if w not in _STOPWORDS]
  • Helper function that scores query tokens against task tokens using token matching with plural/suffix variation support.
    def _token_match(qt: str, tt: str) -> bool:
        if qt == tt:
            return True
        # Handle plurals and simple suffix variations (e.g. "patent" / "patents")
        if len(qt) >= 4 and len(tt) >= 4:
            return tt.startswith(qt) or qt.startswith(tt)
        return False
  • Registration of search_datanexus_tools as a top-level (no namespace) FastMCP tool on the main server instance.
    main.tool()(search_datanexus_tools)
Behavior3/5

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

No annotations provided. The description states it returns matching tool names but does not elaborate on behavior like rate limits, authentication, or side effects. It gives basic behavioral promise but lacks depth.

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 concise, with the key message in the first sentence. Examples are presented clearly without unnecessary text. Efficient use of space.

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

Completeness4/5

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

Given the tool's role as a search/discovery tool, the description covers its purpose, priority, and return type. With an output schema present, it need not detail return structure further. Missing explicit parameter descriptions slightly reduce completeness.

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 0%. The description relies on examples to illustrate parameter usage (e.g., 'domain="legal"'). It adds some meaning but does not formally describe each parameter's purpose or constraints.

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 explicitly states 'find the right DataNexus tool for your task' and positions itself as the entry point. It clearly distinguishes from sibling tools by being the discovery tool.

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

Usage Guidelines4/5

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

Explicitly says 'Call this FIRST before any other DataNexus tool.' Provides examples of usage. However, it does not explicitly state when not to use it or mention alternatives if the tool is already known.

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/datanexusmcp/mcp-server'

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