Repository navigation
feat(api): serve an OpenAPI document annotated for AI agents - #13
Merged
Merged
Conversation
GET /metrics/api/api-docs.json is annotated with x-agent for @data-fair/openapi-mcp: a metrics_aggregate_requests tool (explore profile) and a metrics-review skill, so agents can review the audience of the active account's datasets and applications. _agg accepts format=rows (one flat row per group, with totals and the number of groups) and size; the default series format is unchanged. split also accepts operationTrack and statusClass, and an empty split returns the totals of the period. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Cover the series format with the query shapes the UI sends (splits, filters, legacy refererCategory, refererApp, account and department scoping, validation) and check that the rows format gives the same groups. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
# Conflicts: # package-lock.json # package.json
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The skill keeps a short description in the API doc and links its body, served at /metrics/api/agents/skills/metrics-review.md. Needs @data-fair/openapi-mcp 0.4.0 (linked skills); bump the dependency when it is released. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rever Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ocument advertises Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Serve an OpenAPI document annotated for AI agents, so
@data-fair/openapi-mcp(through data-fair's deployment index) turns the requests aggregation into ametrics_aggregate_requeststool under theread_metricsprofile, with a linkedmetrics-reviewskill.GET /metrics/api/api-docs.json(public): the document, withx-agentannotations; its agent surface is pinned by a golden (test-it/fixtures/agent-surface.read_metrics.json).GET /metrics/api/agents/skills/<name>.md(public): the skill bodies, fromapi/contract/skills/.GET /api/daily-api-metrics/_agggainsformat=rows(one flat row per group, with a totalcountand asizelimit of 1 to 10000) and theoperationTrack/statusClasssplits. The defaultseriesformat is unchanged, covered by new regression tests (test-it/04-agg.ts).pr-readyskill.Why: agents of a deployment should be able to review the audience of the active account's datasets and applications with the same tools any MCP client gets.