shieldapi.check_domain
Check domain security by analyzing DNS records, blacklist status, SPF/DMARC configurations, and SSL certificates to identify potential threats.
Instructions
Check domain reputation: DNS records, blacklists (Spamhaus, SpamCop, SORBS), SPF/DMARC, SSL.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name to check (e.g. example.com) |
Implementation Reference
- src/index.ts:179-187 (handler)The `shieldapi.check_domain` tool is registered dynamically within this loop, utilizing the `callShieldApi` helper function to execute its logic.
for (const [name, def] of Object.entries(TOOLS)) { server.tool( name, def.description, { [def.param]: z.string().describe(def.paramDesc) }, { ...readOnlyAnnotations, title: TOOL_TITLES[name] || name }, async (params) => formatResult(await callShieldApi(def.endpoint, params as Record<string, string>)) ); } - src/index.ts:50-55 (registration)Definition of the `shieldapi.check_domain` tool parameters and endpoint.
'shieldapi.check_domain': { description: 'Check domain reputation: DNS records, blacklists (Spamhaus, SpamCop, SORBS), SPF/DMARC, SSL.', param: 'domain', paramDesc: 'Domain name to check (e.g. example.com)', endpoint: 'check-domain', }, - src/index.ts:101-116 (helper)The helper function `callShieldApi` handles the actual HTTP request to the backend for the check-domain tool.
async function callShieldApi(endpoint: string, params: Record<string, string>): Promise<unknown> { const url = new URL(`${SHIELDAPI_URL}/api/${endpoint}`); for (const [key, value] of Object.entries(params)) { url.searchParams.set(key, value); } if (demoMode) { url.searchParams.set('demo', 'true'); } const response = await paymentFetch(url.toString()); if (!response.ok) { const body = await response.text(); throw new Error(`ShieldAPI ${endpoint} failed (${response.status}): ${body.substring(0, 200)}`); } return response.json(); }