Skip to main content
Glama
konsulto

@konsulto/mcp

Official
by konsulto

konsulto_get_audit_context

Retrieve the active audit's context including name, status, dates, scope and asset counts, and finding severity rollup. Use at session start to orient yourself.

Instructions

One-shot orientation tool — returns the active audit's name, status, dates, scope element count, asset count, finding severity rollup, and team. Call this at session start (after whoami) to ground yourself before doing work in the audit. Defaults to the active audit; pass audit to override.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
auditNoAudit ID. Defaults to active audit.

Implementation Reference

  • src/server.ts:208-212 (registration)
    Tool registration — defines the name, description, optional 'audit' input schema (z.string().optional()), and wires the handler.
    server.tool(
      'konsulto_get_audit_context',
      'One-shot orientation tool — returns the active audit\'s name, status, ' +
        'dates, scope element count, asset count, finding severity rollup, and ' +
        'team. Call this at session start (after whoami) to ground yourself ' +
  • Handler — resolves audit ID via state.resolveAuditId, fetches audit from /audits/{id}, returns name, status, dates, severitySummary, scopeCount, assetCount, teamMembers, tags, and webUrl.
      async ({ audit }) => {
        try {
          const auditId = state.resolveAuditId(audit);
          const a = (await client.get<any>(`/audits/${auditId}`)) as any;
          return ok({
            audit: {
              id: String(a._id ?? a.id),
              name: a.name,
              status: a.status,
              startDate: a.startDate,
              endDate: a.endDate,
              description: a.description,
              severitySummary: a.severitySummary ?? null,
              maxSeverityOpen: a.maxSeverityOpen ?? null,
              scopeCount: Array.isArray(a.scopes) ? a.scopes.length : 0,
              assetCount: Array.isArray(a.assets) ? a.assets.length : 0,
              teamMembers: Array.isArray(a.teamMembers) ? a.teamMembers : [],
              tags: a.tags ?? [],
            },
            webUrl: client.webUrl(`/audits/${a._id ?? a.id}`),
          });
        } catch (err) {
          return errResult(err);
        }
      },
    );
  • Input schema — accepts single optional string parameter 'audit' with Zod validation. No output schema defined beyond the inline return shape.
    {
      audit: z.string().optional().describe('Audit ID. Defaults to active audit.'),
    },
  • SessionState.resolveAuditId — helper used by the handler to resolve the audit ID from an optional override or the active audit, throwing a clear error if neither is available.
    // Convenience used by tools that take an optional audit override —
    // returns the resolved audit ID with a clear error path when neither
    // an explicit override nor an active audit is set. The thrown message
    // is agent-actionable.
    resolveAuditId(override?: string): string {
      if (override && override.trim()) return override.trim();
      if (this.activeAudit) return this.activeAudit.id;
      throw new Error(
        'No active audit. Either pass an explicit "audit" argument, ' +
          'call konsulto_set_active_audit({audit: "<name or id>"}) first, ' +
          'or run from a folder with a .konsulto.yml that pins an audit.',
      );
    }
Behavior5/5

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

With no annotations, the description fully carries the burden. It lists all returned fields, indicates it's a read operation, and describes the default/override behavior. No contradictions or omissions.

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 concise sentences, front-loaded with the core purpose. Every sentence is informative with no wasted words.

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

Completeness5/5

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

Given the tool's low complexity (1 param, no output schema), the description is fully complete: it explains purpose, usage timing, returned data, and parameter behavior.

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 reinforces that 'audit' defaults to active audit and can be overridden, but adds no new details beyond what the schema already provides.

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 it is a 'one-shot orientation tool' that returns specific audit context fields like name, status, dates, counts, and team. This distinguishes it from sibling tools that handle findings, assets, sections, etc.

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

Usage Guidelines5/5

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

Explicitly says to call at session start after 'whoami' to ground yourself before doing work. Also explains default behavior and override with 'audit' parameter, providing clear when-to-use and how-to-use guidance.

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