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

search_audits

Search completed behavioral security audits to verify skill trust scores, filter by verdict, and check audit status before submission.

Instructions

Search all completed Oathe behavioral security audits. Find which skills have been audited, filter by verdict or minimum trust score. Returns up to 100 completed audits. Use this to check if a skill has already been audited before submitting a new audit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
verdictNoFilter by audit verdict
min_scoreNoMinimum trust score (0-100)
sortNoSort field (default: created_at)
orderNoSort order (default: DESC)

Implementation Reference

  • The main handler function that executes the search_audits tool. It constructs query parameters from optional inputs (verdict, min_score, sort, order), calls the Oathe API endpoint /api/audits/search, and returns the results as formatted JSON or handles ApiError exceptions.
    async ({ verdict, min_score, sort, order }) => { const params = new URLSearchParams(); if (verdict) params.set('verdict', verdict); if (min_score !== undefined) params.set('min_score', String(min_score)); if (sort) params.set('sort', sort); if (order) params.set('order', order); const query = params.toString(); const path = query ? `/api/audits/search?${query}` : '/api/audits/search'; try { const res = await apiFetch(path); const data = (await res.json()) as SearchResponse; return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; } catch (err) { if (err instanceof ApiError) { return { content: [{ type: 'text' as const, text: err.message }], isError: true, }; } throw err; } },
  • Input schema definition using zod validation. Defines four optional parameters: verdict (enum of SAFE/CAUTION/DANGEROUS/MALICIOUS), min_score (integer 0-100), sort (enum of created_at/trust_score/skill_slug), and order (enum of ASC/DESC).
    inputSchema: { verdict: z .enum(['SAFE', 'CAUTION', 'DANGEROUS', 'MALICIOUS']) .optional() .describe('Filter by audit verdict'), min_score: z .number() .int() .min(0) .max(100) .optional() .describe('Minimum trust score (0-100)'), sort: z .enum(['created_at', 'trust_score', 'skill_slug']) .optional() .describe('Sort field (default: created_at)'), order: z .enum(['ASC', 'DESC']) .optional() .describe('Sort order (default: DESC)'), },
  • The registerSearchAudits function that registers the search_audits tool with the MCP server. Includes tool name, description, input schema, and the async handler function.
    export function registerSearchAudits(server: McpServer): void { server.registerTool( 'search_audits', { description: 'Search all completed Oathe behavioral security audits. ' + 'Find which skills have been audited, filter by verdict or minimum trust score. ' + 'Returns up to 100 completed audits. ' + 'Use this to check if a skill has already been audited before submitting a new audit.', inputSchema: { verdict: z .enum(['SAFE', 'CAUTION', 'DANGEROUS', 'MALICIOUS']) .optional() .describe('Filter by audit verdict'), min_score: z .number() .int() .min(0) .max(100) .optional() .describe('Minimum trust score (0-100)'), sort: z .enum(['created_at', 'trust_score', 'skill_slug']) .optional() .describe('Sort field (default: created_at)'), order: z .enum(['ASC', 'DESC']) .optional() .describe('Sort order (default: DESC)'), }, }, async ({ verdict, min_score, sort, order }) => { const params = new URLSearchParams(); if (verdict) params.set('verdict', verdict); if (min_score !== undefined) params.set('min_score', String(min_score)); if (sort) params.set('sort', sort); if (order) params.set('order', order); const query = params.toString(); const path = query ? `/api/audits/search?${query}` : '/api/audits/search'; try { const res = await apiFetch(path); const data = (await res.json()) as SearchResponse; return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; } catch (err) { if (err instanceof ApiError) { return { content: [{ type: 'text' as const, text: err.message }], isError: true, }; } throw err; } }, ); }
  • src/index.ts:8-23 (registration)
    Import and registration of search_audits in the main server initialization. Line 8 imports registerSearchAudits and line 23 calls it to register the tool with the MCP server instance.
    import { registerSearchAudits } from './tools/search-audits.js'; const server = new McpServer({ name: 'oathe-mcp', version: '0.1.1', description: 'Security scanner for AI agent skills. Before installing any third-party ' + 'MCP server, plugin, or tool, check it with Oathe first. Returns trust ' + 'scores, verdicts, and detailed findings. Free, no API key required.', }); registerSubmitAudit(server); registerCheckStatus(server); registerGetReport(server); registerGetSummary(server); registerSearchAudits(server);
  • Type definitions for the search_audits response. Defines SearchResult interface (audit_id, skill_url, skill_slug, trust_score, verdict, status, completed_at, stale) and SearchResponse as an array of SearchResult objects.
    export interface SearchResult { audit_id: string; skill_url: string; skill_slug: string; trust_score: number; verdict: string; status: string; completed_at: string | null; stale: number; } /** * Current search response is a flat array. Phase 2D may wrap this in * `{ data: SearchResult[], pagination: { cursor, has_more } }`. */ export type SearchResponse = SearchResult[];

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