Skip to main content
Glama
oathe-ai
by oathe-ai

check_audit_status

Check the status of a security audit submitted via submit_audit. Polls until complete or failed, then returns the full audit report including trust score, verdict, and findings.

Instructions

Check the status of an Oathe security audit submitted via submit_audit. Wait 90 seconds after submission before first poll, then poll every 10 seconds until status is "complete" or "failed". Statuses: queued, scanning, analyzing, summarizing, finalizing, complete, failed. Terminal statuses: complete, failed. When complete, the response includes the full audit report with trust score, verdict, and findings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audit_idYesUUID returned by submit_audit

Implementation Reference

  • The main handler function for check_audit_status. Calls the Oathe API endpoint /api/audit/{audit_id} and returns the audit status response. Handles 404 errors (audit not found) and other API errors.
    async ({ audit_id }) => {
      try {
        const res = await apiFetch(`/api/audit/${audit_id}`);
        const data = (await res.json()) as AuditStatusResponse;
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      } catch (err) {
        if (err instanceof ApiError) {
          if (err.status === 404) {
            return {
              content: [
                {
                  type: 'text' as const,
                  text: 'Audit ID not found — may have expired or be invalid.',
                },
              ],
              isError: true,
            };
          }
          return {
            content: [{ type: 'text' as const, text: err.message }],
            isError: true,
          };
        }
        throw err;
      }
    },
  • Input schema for check_audit_status — accepts a single required 'audit_id' string parameter.
    inputSchema: {
      audit_id: z
        .string()
        .describe('UUID returned by submit_audit'),
    },
  • Registration of the 'check_audit_status' tool on the McpServer via registerTool, including its description and input schema.
    export function registerCheckStatus(server: McpServer): void {
      server.registerTool(
        'check_audit_status',
        {
          description:
            'Check the status of an Oathe security audit submitted via submit_audit. ' +
            'Wait 90 seconds after submission before first poll, then poll every 10 seconds until status is "complete" or "failed". ' +
            'Statuses: queued, scanning, analyzing, summarizing, finalizing, complete, failed. ' +
            'Terminal statuses: complete, failed. ' +
            'When complete, the response includes the full audit report with trust score, verdict, and findings.',
          inputSchema: {
            audit_id: z
              .string()
              .describe('UUID returned by submit_audit'),
          },
        },
        async ({ audit_id }) => {
          try {
            const res = await apiFetch(`/api/audit/${audit_id}`);
            const data = (await res.json()) as AuditStatusResponse;
            return {
              content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
            };
          } catch (err) {
            if (err instanceof ApiError) {
              if (err.status === 404) {
                return {
                  content: [
                    {
                      type: 'text' as const,
                      text: 'Audit ID not found — may have expired or be invalid.',
                    },
                  ],
                  isError: true,
                };
              }
              return {
                content: [{ type: 'text' as const, text: err.message }],
                isError: true,
              };
            }
            throw err;
          }
        },
      );
    }
  • src/index.ts:20-20 (registration)
    Top-level call to registerCheckStatus, connecting the tool to the MCP server at startup.
    registerCheckStatus(server);
  • Type definition for AuditStatusResponse, the structure returned by the check_audit_status API.
    export interface AuditStatusResponse {
      audit_id: string;
      skill_url?: string;
      status: string;
      stage_label?: string;
      error_message?: string;
      report?: {
        trust_score: number;
        verdict: string;
        summary?: string;
        recommendation?: string;
        category_scores?: Record<string, { score: number; weight: number; findings: string[] }>;
        findings?: Finding[];
      };
    }
Behavior5/5

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

Fully explains polling behavior, status progression, and that completion includes full report. No annotations, so description carries burden and does so completely.

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 purpose, then essential details. 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?

Covers all aspects for a polling status check: timing, status meanings, terminal states, and return content. No output schema but description explains what's returned.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Single parameter 'audit_id' is well-described as UUID from submit_audit. Schema coverage 100% and description adds necessary context.

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 checks the status of an Oathe security audit and references the submission tool. It differentiates from siblings like 'submit_audit' and 'get_audit_report'.

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?

Provides explicit polling instructions: wait 90 seconds, poll every 10 seconds. Lists all statuses and terminal ones, making usage clear.

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/oathe-ai/oathe-mcp'

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