Skip to main content
Glama

misp_list_organisations

List MISP organisations, including local and remote sharing partners. Filter by scope: local, external, or all.

Instructions

List MISP organisations (local and remote sharing partners)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNoFilter by local, external, or all organisations

Implementation Reference

  • The tool handler for 'misp_list_organisations'. Registers a server.tool with an optional 'scope' parameter (local/external/all), calls client.listOrganisations(), and returns a formatted JSON summary of organisations.
    server.tool(
      "misp_list_organisations",
      "List MISP organisations (local and remote sharing partners)",
      {
        scope: z
          .enum(["local", "external", "all"])
          .optional()
          .describe("Filter by local, external, or all organisations"),
      },
      async ({ scope }) => {
        try {
          const orgs = await client.listOrganisations(scope || "all");
    
          if (orgs.length === 0) {
            return {
              content: [{ type: "text", text: "No organisations found." }],
            };
          }
    
          const summary = orgs.map((o) => ({
            id: o.id,
            name: o.name,
            uuid: o.uuid,
            description: o.description,
            nationality: o.nationality,
            sector: o.sector,
            type: o.type,
            local: o.local,
          }));
    
          return {
            content: [{ type: "text", text: JSON.stringify(summary, null, 2) }],
          };
        } catch (err) {
          return {
            content: [
              {
                type: "text",
                text: `Error listing organisations: ${err instanceof Error ? err.message : String(err)}`,
              },
            ],
            isError: true,
          };
        }
      }
    );
  • Input schema for the tool defines an optional 'scope' parameter using zod enum with values 'local', 'external', or 'all'.
    {
      scope: z
        .enum(["local", "external", "all"])
        .optional()
        .describe("Filter by local, external, or all organisations"),
    },
  • Registration function that registers the 'misp_list_organisations' (and 'misp_get_organisation') tools on the MCP server. Called from src/index.ts line 41.
    export function registerOrganisationTools(
      server: McpServer,
      client: MispClient
    ): void {
      // List organisations
      server.tool(
        "misp_list_organisations",
        "List MISP organisations (local and remote sharing partners)",
        {
          scope: z
            .enum(["local", "external", "all"])
            .optional()
            .describe("Filter by local, external, or all organisations"),
        },
        async ({ scope }) => {
          try {
            const orgs = await client.listOrganisations(scope || "all");
    
            if (orgs.length === 0) {
              return {
                content: [{ type: "text", text: "No organisations found." }],
              };
            }
    
            const summary = orgs.map((o) => ({
              id: o.id,
              name: o.name,
              uuid: o.uuid,
              description: o.description,
              nationality: o.nationality,
              sector: o.sector,
              type: o.type,
              local: o.local,
            }));
    
            return {
              content: [{ type: "text", text: JSON.stringify(summary, null, 2) }],
            };
          } catch (err) {
            return {
              content: [
                {
                  type: "text",
                  text: `Error listing organisations: ${err instanceof Error ? err.message : String(err)}`,
                },
              ],
              isError: true,
            };
          }
        }
      );
    
      // Get organisation details
      server.tool(
        "misp_get_organisation",
        "Get details of a specific MISP organisation",
        {
          orgId: z.string().describe("Organisation ID"),
        },
        async ({ orgId }) => {
          try {
            const org = await client.getOrganisation(orgId);
            return {
              content: [{ type: "text", text: JSON.stringify(org, null, 2) }],
            };
          } catch (err) {
            return {
              content: [
                {
                  type: "text",
                  text: `Error getting organisation: ${err instanceof Error ? err.message : String(err)}`,
                },
              ],
              isError: true,
            };
          }
        }
      );
    }
  • src/index.ts:41-42 (registration)
    Top-level registration call that invokes registerOrganisationTools to register the tool on the MCP server.
    registerOrganisationTools(server, client);
    registerServerTools(server, client);
  • Helper method on MispClient that makes the HTTP GET request to /organisations/index/scope:{scope} and maps the response to MispOrganisation[].
    async listOrganisations(
      scope: "local" | "external" | "all" = "all"
    ): Promise<MispOrganisation[]> {
      // scope is constrained by the TS type above
      const data = await this.request<
        Array<{ Organisation: MispOrganisation }>
      >("GET", `/organisations/index/scope:${scope}`);
      return (data || []).map((o) => o.Organisation);
    }
Behavior2/5

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

The description states it lists organisations but does not disclose that it is a read-only operation, nor does it mention pagination, authentication requirements, or what happens if no results are found. With no annotations, the description carries full burden for behavioral traits.

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 a single concise sentence that captures the core function. It could be slightly expanded without becoming verbose, but it is well-structured and front-loaded.

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?

For a simple list tool with one optional parameter and no output schema, the description covers the basic purpose and scope. However, it lacks details about ordering, pagination, and result format, which could be helpful for an agent.

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?

The input schema is well-described with an enum and description for the only parameter. The description adds context by implying that the list includes both local and remote orgs, which aligns with the parameter. However, it does not specify the default when scope is not set. Overall, marginal added value.

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 (List) and the resource (MISP organisations), and adds context about scope (local and remote sharing partners). This distinguishes it from siblings like misp_get_organisation (single org) and misp_list_sharing_groups (different entity).

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 guidance is provided on when to use this tool versus alternatives, such as misp_get_organisation for a single organisation. The description does not explain the default behavior when the optional 'scope' parameter is omitted.

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