domains
Retrieve and manage domain details including registration, expiration, auto-renewal, transfer lock, WHOIS privacy, and nameservers for authenticated users.
Instructions
List domains owned by the authenticated user.
Each domain object contains:
id (str): Unique domain identifier (domain_id in other methods)
domain_name (str): The registered domain name
created_at (str): ISO timestamp of domain creation
expires_at (str): ISO timestamp of domain expiration
auto_renew (bool): Whether domain is set to auto-renew
locked (bool): Domain transfer lock status
private (bool): WHOIS privacy protection status
nameservers (list): List of nameserver hostnames
status (str): Domain status (e.g. 'active')
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/sherlock_mcp/server.py:134-150 (handler)The handler function for the MCP 'domains' tool. It executes the tool logic by calling Sherlock._domains() via get_sherlock(), processes the response with handle_response, and serves as both the implementation and registration point via the @mcp.tool() decorator. The docstring provides input/output schema details.@mcp.tool() async def domains(): """ List domains owned by the authenticated user. Each domain object contains: id (str): Unique domain identifier (domain_id in other methods) domain_name (str): The registered domain name created_at (str): ISO timestamp of domain creation expires_at (str): ISO timestamp of domain expiration auto_renew (bool): Whether domain is set to auto-renew locked (bool): Domain transfer lock status private (bool): WHOIS privacy protection status nameservers (list): List of nameserver hostnames status (str): Domain status (e.g. 'active') """ return handle_response(get_sherlock()._domains())
- src/sherlock_mcp/server.py:19-31 (helper)Helper function used by all tools, including 'domains', to standardize responses from Sherlock API calls.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
- src/sherlock_mcp/server.py:10-17 (helper)Helper function that provides the Sherlock instance lazily for use in tool handlers like 'domains'.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()
- src/sherlock_mcp/server.py:136-148 (schema)Docstring within the 'domains' handler describing the output schema/structure of the returned domains list.""" List domains owned by the authenticated user. Each domain object contains: id (str): Unique domain identifier (domain_id in other methods) domain_name (str): The registered domain name created_at (str): ISO timestamp of domain creation expires_at (str): ISO timestamp of domain expiration auto_renew (bool): Whether domain is set to auto-renew locked (bool): Domain transfer lock status private (bool): WHOIS privacy protection status nameservers (list): List of nameserver hostnames status (str): Domain status (e.g. 'active') """
- src/sherlock_mcp/server.py:134-134 (registration)MCP tool registration decorator for the 'domains' tool.@mcp.tool()