Skip to content

feat: add get_api_key tool (api-keys.get parity)#40

Merged
caballeto merged 5 commits into
mainfrom
feat/api-keys-get-tool
Jun 12, 2026
Merged

feat: add get_api_key tool (api-keys.get parity)#40
caballeto merged 5 commits into
mainfrom
feat/api-keys-get-tool

Conversation

@caballeto

Copy link
Copy Markdown
Member

Summary

  • Adds the get_api_key MCP tool, mapping to GET /api/v1/api-keys/{id} (delegates to client.api_keys.get).
  • Updates the EXPECTED_TOOLS registration snapshot in tests/test_tools.py (120 → 121).

Why

The monorepo capability-parity check flagged mcp-server as the only surface missing api-keys.get. The Python and JS SDKs already expose api_keys.get (sdk-python#41, sdk-js#36); this closes the gap so the parity job goes green without a temporary exclusion.

Test plan

  • uv run pytest tests/test_tools.py::TestToolRegistration (tool count + no-unexpected-tools pass)
  • ruff check / ruff format --check clean
  • Parity check green once merged to main

Made with Cursor

caballeto and others added 5 commits June 11, 2026 16:59
Adds the api-keys.get capability to the MCP server, mirroring the
GET /api/v1/api-keys/{id} endpoint that the Python and JS SDKs already
expose. Closes the capability-parity gap flagged by the monorepo parity
check (mcp-server was the only surface missing api-keys.get).

Co-authored-by: Cursor <cursoragent@cursor.com>
The v0.7.2 hotfix moved _strip_internal_schema_fields() out of import
time (it crashed Uvicorn via asyncio.run() inside a running loop) into
the HTTP lifespan and stdio entrypoint. The test fixture kept calling
mcp.list_tools() directly, so it asserted against the pre-strip schema
and test_api_token_hidden_from_input_schema failed on a clean checkout.

Apply the strip in the fixture exactly as production does, so the
hidden-field assertions reflect the real wire schema.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
The get_api_key tool calls client.api_keys.get, which ships in devhelm
SDK 1.4.0 (sdk-python#41, released). Bump the floor + refresh the lock
so typecheck resolves the attribute and the installed SDK has the method.

Co-authored-by: Cursor <cursoragent@cursor.com>
@caballeto caballeto merged commit 2342089 into main Jun 12, 2026
4 checks passed
@caballeto caballeto deleted the feat/api-keys-get-tool branch June 12, 2026 12:54
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.

1 participant