Merged
Conversation
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>
erangeles
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #63 by taking the overlay addition from @nbouvrette's PR and running
speakeasy runlocally to include all generated output.GET /api/v2/auditlogtoschemas/mcp-enable-tools.yamlas the read-onlyget-audit-log-entriestoolsrc/funcs/auditLogListEntries.ts(HTTP func)src/mcp-server/tools/auditLogListEntries.ts(MCP tool wrapper with nameget-audit-log-entries, scopes["read"])src/models/components/andsrc/models/operations/tool$auditLogListEntriesinsrc/mcp-server/server.tsThe tool description guides AI agents on the
specparameter 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
get-audit-log-entriesappears in the MCP tool listspecresource specifierbefore/aftertimestamp filtering worksread)Made with Cursor