Skip to main content
Glama
alberthild

ShieldAPI MCP

by alberthild

shieldapi.check_domain

Read-onlyIdempotent

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
NameRequiredDescriptionDefault
domainYesDomain name to check (e.g. example.com)

Implementation Reference

  • 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',
    },
  • 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();
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4.2/5.0
Behavior4/5

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

The description goes beyond the annotations (readOnly, idempotent, non-destructive) by disclosing the actual checks performed: DNS records, specific blacklists, SPF/DMARC, and SSL. This gives the agent a concrete idea of what the tool inspects. It does not mention output format or response fields, but the provided facets are meaningful behavioral context.

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 a single, tightly packed sentence. It leads with the main action and resource, then enumerates key services using a colon list. Every element adds information; there is no redundant or filler wording.

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?

For a simple, read-only, single-parameter tool, the description sufficiently covers its scope. It lists what the tool checks, which implies output categories. It could mention return format or potential limitations (e.g., rate limits), but the overall context is adequate given the annotations and simple schema.

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 coverage is 100% for the single 'domain' parameter, including an example format. The description adds no extra parameter-level details beyond restating 'domain' in the purpose. Since the schema already documents the parameter well, a baseline score of 3 is appropriate.

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 uses a specific verb 'Check' with a clear resource 'domain reputation' and immediately lists concrete facets: DNS records, blacklists (Spamhaus, SpamCop, SORBS), SPF/DMARC, SSL. This distinguishes it from sibling tools like check_email or check_ip, which target different resource types.

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?

The context is clear: this tool is for domain reputation checks. It does not explicitly state when not to use it or name alternatives, but the sibling tool names and the resource-specific wording imply the appropriate use case. No exclusion or prerequisite is needed for a single-parameter read-only check.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.