• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 45578145302
75%

Build:
DEFAULT BRANCH: main
Ran 25 Nov 2026 08:47AM UTC
Jobs 1
Files 1066
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Nov 2026 08:38AM UTC coverage: 74.093% (+0.03%) from 74.059%
45578145302

push

github

web-flow
Add the MCP tool-call details type (#7283)

* Add the MCP tool-call details type

An access token redeemed from an ID-JAG should be able to serve only the
one MCP call an authorizer approved ("Authorization server: narrow a
JWT-bearer access token to one MCP call with authorization_details"
(#7061)). That needs an authorization_details type that describes the
call, shared by the authorization server and the vMCP that enforces it.

pkg/mcp/toolcalldetails defines https://toolhive.dev/mcp_tool_call: a
tool call (server, tool, arguments_sha256 as 64 lowercase hex,
operation_id) or a list call (server and one of tools/list,
prompts/list, resources/list, resources/templates/list). Register adds
it for token exchange, where AS-1 is meant to sign it into an ID-JAG,
and for JWT-bearer, where AS-2 is meant to read it from the signed
claim. The hook accepts
exactly one entry of its type and grants it unchanged; refusals are
invalid_authorization_details with single_entry_required,
malformed_entry, invalid_arguments_hash or invalid_method. On token
exchange it also refuses unless requested_token_type is the ID-JAG type
(invalid_request, id_jag_required), because a plain exchange would echo
the entry while the issued token carries nothing.

ParseEntry exposes the same shape check as an Entry value, so the vMCP
can parse a token's claim with one definition. It scans the object
itself and refuses repeated members, non-string values, trailing data,
invalid UTF-8 and any value holding U+FFFD, so the decoded value stays
one-to-one with the signed bytes instead of relying on the caller
having run Registry.Parse first.

It is safe to release on its own. Nothing registers the type by
default, and when an embedder does, no token is narrowed: the ID-JAG
token-exchange request still refuses the authorization_details
parameter, JWT-bearer redemption never consults the registry, an
access-token exchange is refused with id_jag_required, and refresh-token
exchange refuses the e... (continued)

90 of 90 new or added lines in 1 file covered. (100.0%)

181 existing lines in 12 files now uncovered.

100006 of 134974 relevant lines covered (74.09%)

869.73 hits per line

Coverage Regressions

Lines Coverage ∆ File
66
84.96
0.25% pkg/authserver/server_impl.go
45
96.41
0.11% pkg/authserver/config.go
20
93.11
0.0% pkg/authserver/server/provider.go
15
89.08
0.07% pkg/authserver/runner/embeddedauthserver.go
12
95.35
0.33% pkg/authserver/server/tokenexchange/id_jag_handler.go
8
89.47
0.74% pkg/authserver/server/tokenexchange/factory.go
5
98.19
0.0% pkg/authserver/server/tokenexchange/handler.go
3
96.34
-3.66% pkg/auth/obo/cache/cache.go
3
64.29
-21.43% pkg/authserver/upstream/tokens.go
2
97.14
0.08% pkg/authserver/server/tokenexchange/id_jag_resolve.go
1
94.24
0.0% pkg/authserver/storage/memory.go
1
88.02
-0.12% pkg/transport/proxy/transparent/transparent_proxy.go
Jobs
ID Job ID Ran Files Coverage
1 45578145302.1 25 Nov 2026 08:47AM UTC 1066
74.09
GitHub Action Run
Source Files on build 45578145302
  • Tree
  • List 1066
  • Changed 16
  • Source Changed 10
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #45578145302
  • faa00768 on github
  • Prev Build on main (#45515023796)
  • Next Build on main (#45597106575)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc