Skip to main content
Glama
CorbettCajun

SpiderFoot MCP Server

Export JSON

spiderfoot_export_json

Export SpiderFoot OSINT scan results in JSON format using scan IDs for data analysis or integration with other tools.

Instructions

Export scan results in JSON for CSV of IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYes

Implementation Reference

  • The core handler logic for the 'spiderfoot_export_json' tool. It sends a POST request to Spiderfoot's '/scanexportjsonmulti' endpoint with the CSV of scan IDs and returns the JSON export data.
    async exportJson(idsCsv: string) {
      const { data } = await this.http.post('/scanexportjsonmulti', { ids: idsCsv });
      return data;
    }
  • src/index.ts:100-104 (registration)
    Registration of the 'spiderfoot_export_json' tool in the stdio MCP server, including input schema and thin wrapper handler that calls the client exportJson method.
    server.registerTool(
      'spiderfoot_export_json',
      { title: 'Export JSON', description: 'Export scan results in JSON for CSV of IDs.', inputSchema: { ids: z.string() } },
      async ({ ids }) => ({ content: [{ type: 'text', text: JSON.stringify(await sf.exportJson(ids)) }] })
    );
  • Registration of the 'spiderfoot_export_json' tool in the HTTP MCP server, identical to the stdio version.
    server.registerTool(
      'spiderfoot_export_json',
      { title: 'Export JSON', description: 'Export scan results in JSON for CSV of IDs.', inputSchema: { ids: z.string() } },
      async ({ ids }) => ({ content: [{ type: 'text', text: JSON.stringify(await sf.exportJson(ids)) }] })
    );
  • Zod schema definition for the tool input (scan IDs as string), though registration uses a similar inline schema.
    const ExportJsonSchema = z.object({ ids: z.string().min(1) });
  • Helper function to create the SpiderfootClient instance from environment variables, used to instantiate 'sf' in both server registrations.
    export function makeSpiderfootClientFromEnv() {
      const baseUrl = process.env.SPIDERFOOT_BASE_URL || 'http://127.0.0.1:5001';
      const username = process.env.SPIDERFOOT_USER;
      const password = process.env.SPIDERFOOT_PASS;
      return new SpiderfootClient({ baseUrl, username, password });
    }
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. It mentions exporting results but doesn't disclose behavioral traits such as whether this is a read-only operation, if it requires specific permissions, rate limits, or what the output looks like. For a tool with no annotations, this is a significant gap in transparency.

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 very concise with a single sentence, which is efficient and front-loaded. However, it's somewhat cryptic ('for CSV of IDs' could be clearer), and while there's no wasted text, it might be too brief to be fully informative.

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

Completeness2/5

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

Given the tool has no annotations, no output schema, and low parameter coverage, the description is incomplete. It doesn't provide enough context for an agent to understand the tool's behavior, output, or how it fits with siblings. For a tool with these gaps, more detail is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 0% description coverage, and the description adds minimal semantics. It implies 'ids' relates to scan IDs in CSV format, but doesn't explain the format, constraints, or examples. This doesn't adequately compensate for the low schema coverage, leaving the parameter poorly understood.

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

Purpose3/5

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

The description states the tool exports scan results in JSON format, which provides a basic purpose. However, it's vague about the resource scope ('for CSV of IDs' is ambiguous) and doesn't clearly distinguish from siblings like spiderfoot_scan_data or spiderfoot_scan_data_unique that might also retrieve scan data. It specifies the output format but lacks clarity on what exactly is exported.

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?

No explicit guidance on when to use this tool versus alternatives is provided. The description mentions 'for CSV of IDs', which might imply usage with multiple scan IDs, but it doesn't clarify prerequisites, when not to use it, or compare to sibling tools. This leaves the agent without clear usage context.

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/CorbettCajun/Spiderfoot-MCP-Server'

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