feat: add get_api_key tool (api-keys.get parity)#40
Merged
Conversation
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>
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
get_api_keyMCP tool, mapping toGET /api/v1/api-keys/{id}(delegates toclient.api_keys.get).EXPECTED_TOOLSregistration snapshot intests/test_tools.py(120 → 121).Why
The monorepo capability-parity check flagged
mcp-serveras the only surface missingapi-keys.get. The Python and JS SDKs already exposeapi_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 --checkcleanMade with Cursor