Skip to main content
Glama
alberthild

ShieldAPI MCP

by alberthild

shieldapi.check_ip

Read-onlyIdempotent

Check IP reputation by analyzing blacklists, detecting Tor exit nodes, and performing reverse DNS lookups to assess security risks.

Instructions

Check IP reputation: blacklists, Tor exit node detection, reverse DNS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYesIPv4 address to check (e.g. 8.8.8.8)

Implementation Reference

  • src/index.ts:179-187 (registration)
    The tool 'shieldapi.check_ip' is registered dynamically within this loop, utilizing the 'TOOLS' definition map and calling the 'callShieldApi' helper function.
    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>))
      );
    }
  • This is the generic handler function that executes the API call for 'shieldapi.check_ip' (and other GET tools) by appending the endpoint and query parameters to the SHIELDAPI_URL.
    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?

Annotations already indicate read-only, non-destructive, idempotent behavior. The description adds specific behavioral context by enumerating the checks performed (blacklists, Tor exit, reverse DNS), which is useful beyond the safety annotations.

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?

Single sentence, front-loaded with action and resource, zero wasted words. Every part adds value.

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 single-parameter IP check, the description conveys the purpose and key checks. Since there is no output schema, it partially explains what the tool will provide (blacklist status, Tor detection, reverse DNS), but could be more explicit about the response format or scoring.

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?

The schema fully describes the 'ip' parameter (IPv4 address, example provided), so the description does not need to add param details. Baseline of 3 is appropriate since the schema carries the meaning, and the description adds no extra parameter semantics.

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?

Clearly states the tool checks IP reputation and lists specific checks (blacklists, Tor exit node detection, reverse DNS). The verb 'Check' plus resource 'IP' distinguishes it from sibling tools like check_domain and check_url.

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 description gives clear context: use for checking IP reputation. It does not explicitly mention alternatives or exclusions, but the scope is unambiguous given the checked resource (IP) and sibling tool names.

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