Skip to content

feat: add get-audit-log-entries MCP tool#72

Merged
nieblara merged 2 commits intomainfrom
feat/add-audit-log-tool
May 8, 2026
Merged

feat: add get-audit-log-entries MCP tool#72
nieblara merged 2 commits intomainfrom
feat/add-audit-log-tool

Conversation

@nieblara
Copy link
Copy Markdown
Contributor

@nieblara nieblara commented May 8, 2026

Summary

Closes #63 by taking the overlay addition from @nbouvrette's PR and running speakeasy run locally to include all generated output.

  • Adds GET /api/v2/auditlog to schemas/mcp-enable-tools.yaml as the read-only get-audit-log-entries tool
  • Generated src/funcs/auditLogListEntries.ts (HTTP func)
  • Generated src/mcp-server/tools/auditLogListEntries.ts (MCP tool wrapper with name get-audit-log-entries, scopes ["read"])
  • Generated request/response models under src/models/components/ and src/models/operations/
  • Registered tool$auditLogListEntries in src/mcp-server/server.ts

The tool description guides AI agents on the spec parameter format (proj/<projectKey>:env/<envKey>:flag/<flagKey>), Unix epoch timestamp pagination, and the 20-entry-per-call limit (newest-first).

Co-authored-by: Nicolas Bouvrette bouvrette.nicolas@gmail.com

Test plan

  • Confirm get-audit-log-entries appears in the MCP tool list
  • Verify audit log entries are returned when querying with a valid spec resource specifier
  • Verify before/after timestamp filtering works
  • Confirm the tool is read-only (scoped to read)

Made with Cursor

nbouvrette and others added 2 commits May 8, 2026 12:11
Enable the GET /api/v2/auditlog endpoint as an MCP tool so AI agents
can query flag change history, filter by resource specifier, and
paginate through audit log entries.

Made-with: Cursor
Runs speakeasy generation after enabling GET /api/v2/auditlog in the
MCP overlay. Adds the auditLogListEntries tool, func, request/response
models, and server registration.

Co-authored-by: Nicolas Bouvrette <bouvrette.nicolas@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@nieblara nieblara merged commit 5617287 into main May 8, 2026
3 checks passed
@nieblara nieblara deleted the feat/add-audit-log-tool branch May 8, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants