Skip to content

feat: add tool examples#50

Merged
Patrik Simek (patriksimek) merged 1 commit intomainfrom
feat-add-examples
Apr 14, 2026
Merged

feat: add tool examples#50
Patrik Simek (patriksimek) merged 1 commit intomainfrom
feat-add-examples

Conversation

@patriksimek
Copy link
Copy Markdown
Member

Add exportable examples of tool usage. Primary for use in CLI.

Copilot AI review requested due to automatic review settings April 14, 2026 20:09
@patriksimek Patrik Simek (patriksimek) requested a review from a team as a code owner April 14, 2026 20:09
@patriksimek Patrik Simek (patriksimek) added the no-production-impact This PR is not impacting production and does not require a JIRA ticket label Apr 14, 2026
@patriksimek Patrik Simek (patriksimek) merged commit 83a7ccc into main Apr 14, 2026
6 checks passed
@patriksimek Patrik Simek (patriksimek) deleted the feat-add-examples branch April 14, 2026 20:10
Copy link
Copy Markdown
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

Adds exportable example payloads to MCP tool definitions to support CLI/tooling consumers, and bumps the package version to reflect the new tool metadata.

Changes:

  • Extend MakeMCPTool with an optional examples field for sample input payloads.
  • Populate examples across most endpoint MCP tool definitions.
  • Bump npm package version from 1.1.2 to 1.2.0 (and lockfile).

Reviewed changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/mcp.ts Adds examples?: ... to the shared MCP tool type so examples can be exported/consumed.
src/endpoints/users.mcp.ts Adds an empty-input example for the users “me” tool.
src/endpoints/teams.mcp.ts Adds example payloads for team list/get/create/delete tools.
src/endpoints/sdk/webhooks.mcp.ts Adds examples for SDK webhook list/get/create/update/delete/section tools.
src/endpoints/sdk/rpcs.mcp.ts Adds examples for SDK RPC list/get/create/update/delete/test/section tools.
src/endpoints/sdk/modules.mcp.ts Adds examples for SDK module list/get/create/update/delete/section tools.
src/endpoints/sdk/functions.mcp.ts Adds examples for SDK function list/get/create/delete/code/test tools.
src/endpoints/sdk/connections.mcp.ts Adds examples for SDK connection list/get/create/update/delete/section/common tools.
src/endpoints/sdk/apps.mcp.ts Adds examples across SDK apps tools and updates the create schema required fields.
src/endpoints/scenarios.mcp.ts Adds examples for scenario list/get/create/update/delete/activate/deactivate/run/interface tools.
src/endpoints/organizations.mcp.ts Adds examples for org list/get/create/update/delete tools.
src/endpoints/keys.mcp.ts Adds examples for key list/get/create/update/delete tools.
src/endpoints/incomplete-executions.mcp.ts Adds examples for incomplete execution list/get tools.
src/endpoints/hooks.mcp.ts Adds examples for hook list/get/create/update/delete tools.
src/endpoints/functions.mcp.ts Adds examples for function list/get/create/update/delete/check tools.
src/endpoints/folders.mcp.ts Adds examples for folder list/create/update/delete tools.
src/endpoints/executions.mcp.ts Adds examples for execution list/get/detail/incomplete-execution tools.
src/endpoints/enums.mcp.ts Adds empty-input examples for enums endpoints.
src/endpoints/devices.mcp.ts Adds example payload for devices list tool.
src/endpoints/data-structures.mcp.ts Adds examples for data structure list/get/create/update/delete tools.
src/endpoints/data-stores.mcp.ts Adds examples for data store list/get/create/update/delete tools.
src/endpoints/data-store-records.mcp.ts Adds examples for data store record list/create/update/replace/delete tools.
src/endpoints/credential-requests.mcp.ts Adds examples across credential request tools.
src/endpoints/connections.mcp.ts Adds examples and updates create schema fields/requirements for connections tools.
package.json Bumps package version to 1.2.0.
package-lock.json Updates lockfile version fields to 1.2.0.
Comments suppressed due to low confidence (1)

src/endpoints/sdk/apps.mcp.ts:97

  • In sdk-apps_create, the JSON schema marks theme and language as required, but the SDK’s CreateSDKAppBody defines both as optional (and the tool’s execute args type also makes them optional). This mismatch can cause schema-based callers to think they must provide these fields. Update the required list (or the arg types) so the tool contract matches the SDK/API.
                },
                private: { type: 'boolean', description: 'Whether the app is private' },
                audience: { type: 'string', description: 'Audience setting for the app' },
            },
            required: ['name', 'label', 'theme', 'language', 'audience'],
        },
        examples: [
            {
                name: 'my-app',
                label: 'My App',
                description: 'A custom app',
                theme: '#FF5733',
                language: 'en',
                audience: 'global',
            },
        ],
        execute: async (
            make: Make,
            args: {
                name: string;
                label: string;
                description?: string;
                theme?: string;
                language?: string;
                countries?: string[];
                private?: boolean;
                audience: string;
            },

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

Comment on lines 79 to +91
@@ -82,8 +86,9 @@ export const tools = [
description: 'OAuth scopes',
},
},
required: ['name', 'accountName', 'accountType', 'teamId'],
required: ['name', 'accountName', 'teamId'],
},
examples: [{ name: 'My Google Connection', accountName: 'google', teamId: 5 }],
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

connections_create inputSchema/typing doesn’t match the underlying Connections.create API: the endpoint type is CreateConnectionBody with { name, accountName, teamId, data?, scopes? } (no accountType), but the tool’s execute args still require accountType, and the schema exposes scope (singular) instead of scopes (plural). This makes the tool contract confusing and prevents callers from providing OAuth scopes in a way that can actually be forwarded. Align the tool schema + args type with CreateConnectionBody (drop accountType, rename scope to scopes or remove it if unsupported) and ensure the value is passed through correctly.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-production-impact This PR is not impacting production and does not require a JIRA ticket

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants