Skip to main content
Glama
konsulto

@konsulto/mcp

Official
by konsulto

konsulto_bulk_update_status

Batch update the status of multiple security findings. Preview changes with dryRun before committing.

Instructions

Change the status of many findings at once. Use for "client confirmed the fix on all of these" or "all stale findings should be closed". Set dryRun: true first to preview affected findings before committing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
findingIdsYes
statusYes
dryRunNo

Implementation Reference

  • The tool handler for 'konsulto_bulk_update_status'. Accepts findingIds (array of strings), status (enum with open/accepted/mitigated/closed/rejected), and optional dryRun (default false). If dryRun is true, fetches each finding to preview updates. Otherwise, POSTs to /findings/bulk-update-status endpoint with the ids and status updates.
    server.tool(
      'konsulto_bulk_update_status',
      'Change the status of many findings at once. Use for "client confirmed ' +
        'the fix on all of these" or "all stale findings should be closed". ' +
        'Set dryRun: true first to preview affected findings before committing.',
      {
        findingIds: z.array(z.string()).min(1),
        status: z.enum(['open', 'accepted', 'mitigated', 'closed', 'rejected']),
        dryRun: z.boolean().optional().default(false),
      },
      async ({ findingIds, status, dryRun }) => {
        try {
          if (dryRun) {
            // Pre-fetch the targets so the agent can show the user what will
            // change before they confirm. Backend has no native dry-run on the
            // bulk endpoint; this simulates it client-side.
            const fetched = await Promise.all(
              findingIds.map((id) => client.get<any>(`/findings/${id}`).catch(() => null)),
            );
            return ok({
              dryRun: true,
              wouldUpdate: fetched
                .filter((f) => f)
                .map((f: any) => ({
                  id: String(f._id ?? f.id),
                  title: f.title,
                  currentStatus: f.status,
                  newStatus: status,
                })),
              message:
                'Re-call with dryRun: false to apply. Show this list to the user first.',
            });
          }
          const result = (await client.post<any>('/findings/bulk-update-status', {
            ids: findingIds,
            updates: { status },
          })) as any;
          return ok({ result, count: findingIds.length, newStatus: status });
        } catch (err) {
          return errResult(err);
        }
      },
    );
  • Zod schema for input validation: findingIds (array of strings, min 1), status (enum: open, accepted, mitigated, closed, rejected), dryRun (optional boolean, defaults to false).
    {
      findingIds: z.array(z.string()).min(1),
      status: z.enum(['open', 'accepted', 'mitigated', 'closed', 'rejected']),
      dryRun: z.boolean().optional().default(false),
    },
  • src/server.ts:521-563 (registration)
    Registered via server.tool() call with name 'konsulto_bulk_update_status' in the buildServer function of server.ts.
    server.tool(
      'konsulto_bulk_update_status',
      'Change the status of many findings at once. Use for "client confirmed ' +
        'the fix on all of these" or "all stale findings should be closed". ' +
        'Set dryRun: true first to preview affected findings before committing.',
      {
        findingIds: z.array(z.string()).min(1),
        status: z.enum(['open', 'accepted', 'mitigated', 'closed', 'rejected']),
        dryRun: z.boolean().optional().default(false),
      },
      async ({ findingIds, status, dryRun }) => {
        try {
          if (dryRun) {
            // Pre-fetch the targets so the agent can show the user what will
            // change before they confirm. Backend has no native dry-run on the
            // bulk endpoint; this simulates it client-side.
            const fetched = await Promise.all(
              findingIds.map((id) => client.get<any>(`/findings/${id}`).catch(() => null)),
            );
            return ok({
              dryRun: true,
              wouldUpdate: fetched
                .filter((f) => f)
                .map((f: any) => ({
                  id: String(f._id ?? f.id),
                  title: f.title,
                  currentStatus: f.status,
                  newStatus: status,
                })),
              message:
                'Re-call with dryRun: false to apply. Show this list to the user first.',
            });
          }
          const result = (await client.post<any>('/findings/bulk-update-status', {
            ids: findingIds,
            updates: { status },
          })) as any;
          return ok({ result, count: findingIds.length, newStatus: status });
        } catch (err) {
          return errResult(err);
        }
      },
    );
  • The 'ok' helper function used within the handler to format successful JSON responses for MCP tool results.
    function ok(payload: unknown) {
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(payload, null, 2) }],
      };
    }
  • The 'errResult' helper function used within the handler to format error responses for MCP tool results.
    function errResult(err: unknown) {
      const message = err instanceof Error ? err.message : String(err);
      return {
        isError: true,
        content: [{ type: 'text' as const, text: `Error: ${message}` }],
      };
    }
Behavior3/5

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

No annotations, so description carries burden. Discloses bulk operation and dryRun preview, but lacks details on reversibility, permissions, or partial failures.

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?

Two sentences, front-loaded with purpose, minimal waste. Efficient for agent consumption.

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?

Covers main use case with safety tip. Lacks details on error handling and atomicity, but sufficient for typical usage given sibling context.

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 has 0% description coverage. Description partially explains parameters (bulk implies findingIds, status change, dryRun mentioned), but doesn't detail enum values or constraints.

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 tool changes status of many findings at once, with specific examples. It distinguishes from sibling 'konsulto_update_finding' by emphasizing bulk operation.

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?

Provides explicit use cases and recommends dryRun first. Missing when not to use but context is clear enough.

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/konsulto/konsulto-mcp'

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