Skip to main content
Glama
Fewsats
by Fewsats

search

Find available domains by entering a query without subdomains or spaces. Get results with domain availability, prices in USD cents, and a search ID for purchase requests.

Instructions

Search for available domains matching the query. Returns search results with available/unavailable domains, their prices in USD cents, and a search ID needed for purchase requests. The query can be a full domain name with or without the TLD but not subdomains or text. Valid queries: - "example" - "example.com" - "my-domain" Invalid queries: - "www.example.com" # no subdomains - "this is a search" # no spaces - "sub.domain.com" # no subdomains

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYes

Implementation Reference

  • The handler function for the MCP 'search' tool. It takes a query string, calls the underlying Sherlock library's _search method, and processes the response using handle_response.
    @mcp.tool() async def search(q: str) -> str: """ Search for available domains matching the query. Returns search results with available/unavailable domains, their prices in USD cents, and a search ID needed for purchase requests. The query can be a full domain name with or without the TLD but not subdomains or text. Valid queries: - "example" - "example.com" - "my-domain" Invalid queries: - "www.example.com" # no subdomains - "this is a search" # no spaces - "sub.domain.com" # no subdomains """ return handle_response(get_sherlock()._search(q))
  • Helper function used by the search tool (and others) to standardize responses from Sherlock API calls, handling both raw HTTP responses and pre-processed data.
    def handle_response(response): """ Handle responses from Sherlock methods. Sherlock methods already process the response using _handle_response, which returns either a processed JSON object for successful requests or the response object itself. """ if hasattr(response, 'status_code'): # This is a raw response object try: return response.status_code, response.json() except: return response.status_code, response.text # This is already processed data (like a dictionary) return response
  • Helper function to lazily initialize and return the Sherlock instance used by the search tool.
    def get_sherlock(): """Get or create a Sherlock instance. We want to create the class instance inside the tool, so the init errors will bubble up to the tool and hence the MCP client instead of silently failing during the server creation. """ return Sherlock()

Other Tools

Related 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/Fewsats/sherlock-mcp'

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