Skip to content

refactor(credential-requests): rename and simplify credential request endpoints#37

Merged
Patrik Simek (patriksimek) merged 6 commits intomainfrom
improve-credential-requests-tools
Mar 10, 2026
Merged

refactor(credential-requests): rename and simplify credential request endpoints#37
Patrik Simek (patriksimek) merged 6 commits intomainfrom
improve-credential-requests-tools

Conversation

@winterworks
Copy link
Contributor

@winterworks Bram Winter (winterworks) commented Mar 9, 2026

Improve the MCP tools for credential requests:

  • Remove the create credential request endpoint and only rely on the create action
  • Shorten the MCP tool names to be within the limit
  • Extend the descriptions

@winterworks Bram Winter (winterworks) marked this pull request as ready for review March 10, 2026 07:56
@winterworks Bram Winter (winterworks) requested a review from a team as a code owner March 10, 2026 07:56
Copilot AI review requested due to automatic review settings March 10, 2026 07:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the MCP tool definitions for the credential requests endpoint. It consolidates the API surface by removing the low-level "create credential request" MCP tool and replacing it with the simpler createAction flow. The PR also renames several tools for brevity and improves tool descriptions with more contextual guidance.

Changes:

  • Removes the credential_requests_create MCP tool (which called create) and promotes createAction as the primary way to create credential requests via MCP (now named credential_requests_create)
  • Renames credential-level tools from credential_requests_get_credential/decline/delete_credential to shorter forms (credential_get/decline/delete) and introduces a new CredentialSelection type for the simplified CreateCredentialActionBody
  • Updates tests to reflect the new credentials array field (replacing connections/keys) and appVersion as a number instead of string

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/endpoints/credential-requests.ts Introduces CredentialSelection type and simplifies CreateCredentialActionBody to use a single credentials array
src/endpoints/credential-requests.mcp.ts Renames and extends descriptions for MCP tools; removes old create tool; adds new detailed schema for credential_requests_create
src/index.ts Exports new CreateCredentialActionBody and CredentialSelection types
test/credential-requests.spec.ts Updates createAction test to use the new credentials field with appVersion as a number
test/credential-requests.integration.test.ts Updates integration tests to use getDetail directly and new createAction body shape

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@patriksimek Patrik Simek (patriksimek) merged commit 72f6f10 into main Mar 10, 2026
4 checks passed
@patriksimek Patrik Simek (patriksimek) deleted the improve-credential-requests-tools branch March 10, 2026 10:46
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.

4 participants