Skip to main content
Glama

misp_cache_feed

Cache threat intelligence feed data locally to correlate indicators without generating MISP events.

Instructions

Cache feed data locally for correlation without creating events

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feedIdYesFeed ID to cache

Implementation Reference

  • The main handler for the 'misp_cache_feed' tool. Registers the tool with the MCP server via server.tool(), accepts a feedId parameter, and calls client.cacheFeed(feedId) to cache feed data locally without creating events.
    // Cache feed
    server.tool(
      "misp_cache_feed",
      "Cache feed data locally for correlation without creating events",
      {
        feedId: z.string().describe("Feed ID to cache"),
      },
      async ({ feedId }) => {
        try {
          const result = await client.cacheFeed(feedId);
          return {
            content: [
              {
                type: "text",
                text: result.message || `Feed ${feedId} cache initiated.`,
              },
            ],
          };
        } catch (err) {
          return {
            content: [
              {
                type: "text",
                text: `Error caching feed: ${err instanceof Error ? err.message : String(err)}`,
              },
            ],
            isError: true,
          };
        }
      }
  • Input schema for misp_cache_feed: requires a single string parameter 'feedId' described as 'Feed ID to cache', validated with Zod.
    {
      feedId: z.string().describe("Feed ID to cache"),
    },
  • src/index.ts:40-41 (registration)
    Registration of all feed tools (including misp_cache_feed) via registerFeedTools(server, client) in the main index file.
    registerFeedTools(server, client);
    registerOrganisationTools(server, client);
  • The registerFeedTools function definition that registers misp_cache_feed and other feed-related tools on the MCP server instance.
    export function registerFeedTools(server: McpServer, client: MispClient): void {
      // List feeds
      server.tool(
        "misp_list_feeds",
        "List configured MISP feeds (threat intel sources, IOC feeds, etc.)",
        {
          enabled: z
            .boolean()
            .optional()
            .describe("Filter by enabled/disabled status"),
        },
        async ({ enabled }) => {
          try {
            let feeds = await client.listFeeds();
    
            if (enabled !== undefined) {
              feeds = feeds.filter((f) => f.enabled === enabled);
            }
    
            if (feeds.length === 0) {
              return {
                content: [{ type: "text", text: "No feeds found." }],
              };
            }
    
            const summary = feeds.map((f) => ({
              id: f.id,
              name: f.name,
              provider: f.provider,
              url: f.url,
              enabled: f.enabled,
              source_format: f.source_format,
              distribution: f.distribution,
              event_id: f.event_id,
              caching_enabled: f.caching_enabled,
            }));
    
            return {
              content: [{ type: "text", text: JSON.stringify(summary, null, 2) }],
            };
          } catch (err) {
            return {
              content: [
                {
                  type: "text",
                  text: `Error listing feeds: ${err instanceof Error ? err.message : String(err)}`,
                },
              ],
              isError: true,
            };
          }
        }
      );
    
      // Enable/disable feed
      server.tool(
        "misp_toggle_feed",
        "Enable or disable a MISP feed",
        {
          feedId: z.string().describe("Feed ID"),
          enable: z.boolean().describe("true to enable, false to disable"),
        },
        async ({ feedId, enable }) => {
          try {
            await client.toggleFeed(feedId, enable);
            return {
              content: [
                {
                  type: "text",
                  text: `Feed ${feedId} ${enable ? "enabled" : "disabled"} successfully.`,
                },
              ],
            };
          } catch (err) {
            return {
              content: [
                {
                  type: "text",
                  text: `Error toggling feed: ${err instanceof Error ? err.message : String(err)}`,
                },
              ],
              isError: true,
            };
          }
        }
      );
    
      // Fetch feed data
      server.tool(
        "misp_fetch_feed",
        "Trigger a fetch/pull of data from a specific MISP feed",
        {
          feedId: z.string().describe("Feed ID to fetch"),
        },
        async ({ feedId }) => {
          try {
            const result = await client.fetchFeed(feedId);
            return {
              content: [
                {
                  type: "text",
                  text: result.message || `Feed ${feedId} fetch initiated.`,
                },
              ],
            };
          } catch (err) {
            return {
              content: [
                {
                  type: "text",
                  text: `Error fetching feed: ${err instanceof Error ? err.message : String(err)}`,
                },
              ],
              isError: true,
            };
          }
        }
      );
    
      // Cache feed
      server.tool(
        "misp_cache_feed",
        "Cache feed data locally for correlation without creating events",
        {
          feedId: z.string().describe("Feed ID to cache"),
        },
        async ({ feedId }) => {
          try {
            const result = await client.cacheFeed(feedId);
            return {
              content: [
                {
                  type: "text",
                  text: result.message || `Feed ${feedId} cache initiated.`,
                },
              ],
            };
          } catch (err) {
            return {
              content: [
                {
                  type: "text",
                  text: `Error caching feed: ${err instanceof Error ? err.message : String(err)}`,
                },
              ],
              isError: true,
            };
          }
        }
      );
    }
  • The client-side helper method cacheFeed() that makes a GET request to the MISP API endpoint /feeds/cacheFeeds/{feedId} to trigger caching of feed data.
    async cacheFeed(feedId: string): Promise<{ message: string }> {
      return this.request<{ message: string }>(
        "GET",
        `/feeds/cacheFeeds/${encodeId(feedId, "feedId")}`
      );
    }
Behavior2/5

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

No annotations provided. Description hints at a non-destructive operation ('without creating events'), but does not disclose side effects, authentication needs, or rate limits. For a caching tool, more behavioral context is needed.

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 that is direct and front-loaded. Every word earns its place.

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 the simplicity (one parameter, no output schema), the description is somewhat complete but lacks usage guidelines and behavioral transparency. Adequate for a simple tool but has gaps.

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% for one parameter (feedId). The description provides context for the overall operation but does not add meaning beyond the schema's description for feedId. Baseline 3 is appropriate.

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?

Description clearly states caching feed data locally for correlation, and explicitly says 'without creating events', distinguishing it from misp_fetch_feed. The verb 'cache' and resource 'feed data' are specific.

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

Usage Guidelines3/5

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

Implied usage for offline correlation without event creation, but no explicit guidance on when to use this tool versus siblings like misp_fetch_feed or misp_toggle_feed. No prerequisites mentioned.

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/solomonneas/misp-mcp'

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