list_domains
View verified domains and their verification status to prepare for penetration testing with TurboPentest.
Instructions
List your verified domains and their verification status. Domains must be verified before you can run pentests against them.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/list-domains.ts:15-63 (handler)The handler for list_domains tool, which fetches domains via client.listDomains and formats them for the MCP response.
async () => { try { const domains = await client.listDomains(); if (domains.length === 0) { return { content: [ { type: "text" as const, text: "No domains found.\n\n" + "To verify a domain, add a DNS TXT record at turbopentest.com/domains.", }, ], }; } const lines = [`Domains (${domains.length})`, ""]; for (const d of domains) { const verified = d.verifiedAt ? "Verified" : "Pending"; const expiry = d.expiresAt ? `Expires: ${d.expiresAt}` : ""; lines.push( ` ${d.domain}`, ` Status: ${verified}`, ` Token: ${d.token}`, expiry ? ` ${expiry}` : "", ` Added: ${d.createdAt}`, "", ); } return { content: [ { type: "text" as const, text: lines.filter((l) => l !== "").join("\n"), }, ], }; } catch (error) { const message = error instanceof Error ? error.message : String(error); return { content: [{ type: "text" as const, text: `Failed to list domains: ${message}` }], isError: true, }; } }, - src/tools/list-domains.ts:6-14 (registration)Tool registration for list_domains.
server.registerTool( "list_domains", { title: "List Domains", description: "List your verified domains and their verification status. " + "Domains must be verified before you can run pentests against them.", inputSchema: z.object({}), }, - src/client.ts:128-130 (helper)The client method that actually makes the API request to fetch domains.
async listDomains(): Promise<Domain[]> { return this.request<Domain[]>("/tlds"); }