Skip to main content
Glama
badchars

osint-mcp-server

by badchars

st_dns_history

Retrieve historical DNS records for domains to analyze past configurations, identify changes, and investigate security events using SecurityTrails data.

Instructions

Get historical DNS records for a domain via SecurityTrails. Shows first/last seen dates, values, and organizations. Requires ST_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to get DNS history for
typeYesDNS record type

Implementation Reference

  • The handler function stDnsHistory in src/securitytrails/index.ts performs the actual API call to SecurityTrails and processes the response.
    export async function stDnsHistory(domain: string, type: string, apiKey: string): Promise<StDnsHistoryResult> {
      const validTypes = ["a", "aaaa", "mx", "ns", "soa", "txt"];
      const t = type.toLowerCase();
      if (!validTypes.includes(t)) throw new Error(`Invalid DNS type: ${type}. Valid: ${validTypes.join(", ")}`);
    
      const data = await stFetch(`/history/${encodeURIComponent(domain)}/dns/${t}`, apiKey);
      const records: StDnsHistoryRecord[] = (data.records ?? []).map((r: any) => ({
        values: (r.values ?? []).map((v: any) => v.ip ?? v.host ?? v.value ?? String(v)),
        type: r.type ?? t,
        firstSeen: r.first_seen ?? "",
        lastSeen: r.last_seen ?? "",
        organizations: r.organizations,
      }));
    
      return { domain, type: t, records, total: records.length };
    }
  • The st_dns_history tool definition and registration logic, including input validation schema and API key handling.
    const stDnsHistoryTool: ToolDef = {
      name: "st_dns_history",
      description: "Get historical DNS records for a domain via SecurityTrails. Shows first/last seen dates, values, and organizations. Requires ST_API_KEY.",
      schema: {
        domain: z.string().describe("Domain to get DNS history for"),
        type: z.enum(["a", "aaaa", "mx", "ns", "soa", "txt"]).describe("DNS record type"),
      },
      execute: async (args, ctx) => {
        const key = requireApiKey(ctx.config.stApiKey, "SecurityTrails", "ST_API_KEY");
        return json(await stDnsHistory(args.domain as string, args.type as string, key));
      },
    };
  • The interfaces defining the input and output structure for the DNS history records.
    interface StDnsHistoryRecord {
      values: string[];
      type: string;
      firstSeen: string;
      lastSeen: string;
      organizations?: string[];
    }
    
    interface StDnsHistoryResult {
      domain: string;
      type: string;
      records: StDnsHistoryRecord[];
      total: number;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the API key requirement and hints at output content ('Shows first/last seen dates, values, and organizations'), but lacks details on rate limits, authentication scope, error handling, or data format. For a tool with no annotations, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded, with two sentences that efficiently cover purpose, output details, and prerequisites. No wasted words, though it could be slightly more structured (e.g., separating purpose from requirements).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description provides basic purpose and output hints but lacks completeness for a tool with historical data retrieval. It doesn't explain return format, pagination, or error cases, which are important for an API-based tool. The schema covers parameters well, but overall context is minimal.

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 description coverage is 100%, with both parameters (domain and type) well-documented in the schema. The description doesn't add any parameter-specific details beyond what's in the schema, such as domain format examples or type usage context. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get historical DNS records for a domain via SecurityTrails.' It specifies the verb ('Get'), resource ('historical DNS records'), and data source ('SecurityTrails'), which distinguishes it from general DNS tools like dns_lookup. However, it doesn't explicitly differentiate from other historical or SecurityTrails-specific tools in the sibling list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance: it mentions the requirement for an API key ('Requires ST_API_KEY') but offers no context on when to use this tool versus alternatives like dns_lookup, st_subdomains, or other DNS-related siblings. There's no explicit when/when-not or alternative tool recommendations.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/badchars/osint-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server