Skip to main content
Glama
badchars

osint-mcp-server

by badchars

vt_url

Submit a URL to VirusTotal to retrieve scanning results classifying it as malicious, suspicious, or harmless.

Instructions

Submit a URL to VirusTotal for scanning and get analysis results (malicious/suspicious/harmless). Requires VT_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to scan

Implementation Reference

  • The main handler function `vtUrl` that submits a URL to VirusTotal for analysis and returns the scan results (completed/queued status and stats).
    export async function vtUrl(url: string, apiKey: string): Promise<VtUrlResult> {
      // Submit URL for analysis
      await limiter.acquire();
      const submitRes = await fetch(`${VT_BASE}/urls`, {
        method: "POST",
        headers: { "x-apikey": apiKey, "Content-Type": "application/x-www-form-urlencoded" },
        body: `url=${encodeURIComponent(url)}`,
      });
    
      if (!submitRes.ok) throw new Error(`VirusTotal URL submit failed: ${submitRes.status}`);
      const submitData = await submitRes.json();
      const analysisId = submitData.data?.id;
    
      if (!analysisId) {
        return { url, status: "submitted", analysisId: undefined };
      }
    
      // Try to get analysis results (may not be ready yet)
      try {
        const analysisData = await vtFetch(`/analyses/${analysisId}`, apiKey);
        if (analysisData?.data?.attributes?.status === "completed") {
          return {
            url,
            analysisId,
            analysisStats: analysisData.data.attributes.stats,
            status: "completed",
          };
        }
        return { url, analysisId, status: analysisData?.data?.attributes?.status ?? "queued" };
      } catch {
        return { url, analysisId, status: "queued" };
      }
    }
  • The `VtUrlResult` interface defining the shape of the result returned by vtUrl (url, analysisId, analysisStats, status).
    interface VtUrlResult {
      url: string;
      analysisId?: string;
      analysisStats?: VtAnalysisStats;
      status: string;
    }
  • The `vtUrlTool` ToolDef registration with name 'vt_url', description, Zod schema (url string), and execute handler that calls the imported vtUrl function.
    const vtUrlTool: ToolDef = {
      name: "vt_url",
      description: "Submit a URL to VirusTotal for scanning and get analysis results (malicious/suspicious/harmless). Requires VT_API_KEY.",
      schema: {
        url: z.string().describe("URL to scan"),
      },
      execute: async (args, ctx) => {
        const key = requireApiKey(ctx.config.vtApiKey, "VirusTotal", "VT_API_KEY");
        return json(await vtUrl(args.url as string, key));
      },
    };
  • The `vtUrlTool` is exported in the tools array so it gets registered with the MCP server.
    vtUrlTool,
  • The `vtFetch` helper used internally by vtUrl to fetch analysis results from VirusTotal API.
    async function vtFetch(path: string, apiKey: string): Promise<any> {
      await limiter.acquire();
      const res = await fetch(`${VT_BASE}${path}`, {
        headers: { "x-apikey": apiKey },
      });
      if (res.status === 404) return null;
      if (!res.ok) throw new Error(`VirusTotal API error: ${res.status} ${res.statusText}`);
      return res.json();
    }
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses the key requirement and typical results, but lacks details on rate limits, queuing, idempotency, or error behavior.

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 concise sentence with no extraneous information. Front-loaded with action and resource.

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 tool with one parameter and no output schema, the description covers the purpose, requirement, and result types. Could be slightly more detailed about the analysis output structure.

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%, so baseline is 3. The description does not add extra meaning beyond 'URL to scan' beyond the schema's description.

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 action (submit for scanning) and the resource (URL to VirusTotal), and distinguishes from sibling tools like vt_domain and vt_ip by explicitly mentioning URL scanning.

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?

It provides clear context for when to use (for scanning URLs) but does not explicitly mention when not to use or compare to alternatives. The requirement of VT_API_KEY is stated.

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