Skip to main content
Glama
badchars

osint-mcp-server

by badchars

censys_host_details

Retrieve comprehensive host intelligence from Censys for any IP address, including services, certificates, OS details, location, and ASN data to support security analysis and reconnaissance.

Instructions

Get detailed Censys host information for a single IP: all services, certificates, OS, location, ASN. Requires CENSYS_API_ID + CENSYS_API_SECRET.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYesIP address to look up

Implementation Reference

  • The implementation of the `censysHostDetails` function which performs the API request to Censys and maps the result.
    export async function censysHostDetails(ip: string, auth: CensysAuth): Promise<CensysHost> {
      const data = await censysFetch("GET", `/hosts/${encodeURIComponent(ip)}`, auth);
      const h = data.result ?? {};
    
      return {
        ip: h.ip ?? ip,
        services: (h.services ?? []).map((s: any) => ({
          port: s.port,
          serviceName: s.service_name ?? s.extended_service_name ?? "",
          transportProtocol: s.transport_protocol ?? "TCP",
          certificate: s.tls?.certificates?.leaf_data?.fingerprint,
        })),
        location: h.location
          ? { country: h.location.country, city: h.location.city, province: h.location.province }
          : undefined,
        autonomousSystem: h.autonomous_system
          ? { asn: h.autonomous_system.asn, name: h.autonomous_system.name, bgpPrefix: h.autonomous_system.bgp_prefix }
          : undefined,
        lastUpdatedAt: h.last_updated_at,
        operatingSystem: h.operating_system
          ? { product: h.operating_system.product, version: h.operating_system.version }
          : undefined,
      };
    }
  • Registration of the `censys_host_details` tool definition.
    const censysHostDetailsTool: ToolDef = {
      name: "censys_host_details",
      description: "Get detailed Censys host information for a single IP: all services, certificates, OS, location, ASN. Requires CENSYS_API_ID + CENSYS_API_SECRET.",
      schema: {
        ip: z.string().describe("IP address to look up"),
      },
      execute: async (args, ctx) => {
        const id = requireApiKey(ctx.config.censysApiId, "Censys", "CENSYS_API_ID");
        const secret = requireApiKey(ctx.config.censysApiSecret, "Censys", "CENSYS_API_SECRET");
        return json(await censysHostDetails(args.ip as string, { id, secret }));
      },
    };
    
    const censysCertificatesTool: ToolDef = {
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses critical behavioral traits: it's a read-only lookup (implied by 'Get'), requires authentication (API credentials), and specifies the scope ('single IP'). It does not mention rate limits, error handling, or output format, leaving some gaps.

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 two sentences with zero waste: the first sentence states purpose and data returned, the second specifies prerequisites. It is front-loaded with the core functionality and appropriately sized for a simple lookup tool.

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 is moderately complete: it covers purpose, scope, and auth needs. However, it lacks details on return values (e.g., format, structure), error cases, or performance constraints, which are important for a tool with external API dependencies.

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 the parameter 'ip' well-documented in the schema. The description adds no additional parameter semantics beyond implying it's for a 'single IP', which aligns with the schema. Baseline 3 is appropriate as the schema does the heavy lifting.

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 clearly states the specific action ('Get detailed Censys host information') and resource ('single IP'), listing the exact data returned (services, certificates, OS, location, ASN). It distinguishes itself from sibling tools like 'censys_hosts' (likely a bulk search) by specifying single-IP lookup.

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 explicitly states when to use this tool ('for a single IP') and mentions prerequisites ('Requires CENSYS_API_ID + CENSYS_API_SECRET'), providing clear context. However, it does not specify when NOT to use it or name alternatives among siblings (e.g., vs. 'shodan_host' or 'vt_ip').

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