-
Couldn't load subscription status.
- Fork 776
feat: custom tools #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat: custom tools #224
Conversation
There was a problem hiding this 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 introduces comprehensive custom tools functionality, enabling users to configure and execute dynamic API tools through JSONata scripts. The system includes request interception for authentication token capture, a user-friendly configuration interface, and seamless integration with the existing MCP architecture.
Key changes:
- Custom tools execution engine with JSONata scripting support
- Request interception system for automatic token capture
- Vue-based configuration UI with real-time validation
- Integration with native server for dynamic tool registration
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| custom-tools-config.json | Example configuration with 1432+ lines of custom tools and request listeners |
| app/native-server/src/mcp/register-tools.ts | Enhanced tool registration to merge static and dynamic tools |
| app/native-server/src/mcp/dynamic-tools.ts | Core dynamic tools manager for fetching and managing custom tool schemas |
| app/chrome-extension/entrypoints/popup/components/CustomToolsConfig.vue | Complete Vue component for custom tools configuration UI |
| app/chrome-extension/entrypoints/background/tools/custom-tools.ts | JSONata-based custom tool executor with network capabilities |
| app/chrome-extension/entrypoints/background/request-interceptor.ts | HTTP request interception system for token capture |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (3)
app/native-server/src/mcp/dynamic-tools.ts:1
- The isError flag should be false for successful custom tool execution. Currently, all successful results are marked as errors, which will confuse MCP clients.
import { Tool } from '@modelcontextprotocol/sdk/types.js';
app/chrome-extension/entrypoints/background/tools/custom-tools.ts:1
- Inconsistent variable reference. Should use $LISTENER_DATA.company_cloud_auth_token to match the pattern used elsewhere in the file.
import { BaseBrowserToolExecutor } from './base-browser';
app/chrome-extension/entrypoints/background/tools/custom-tools.ts:1
- Another inconsistent variable reference at line 764. Should use $LISTENER_DATA.company_cloud_auth_token for consistency.
import { BaseBrowserToolExecutor } from './base-browser';
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
app/chrome-extension/entrypoints/popup/components/CustomToolsConfig.vue
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 17 out of 18 changed files in this pull request and generated 3 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)
app/chrome-extension/entrypoints/background/tools/custom-tools.ts:1
- Inconsistent variable reference: uses
$tokens.company_cloud_auth_tokeninstead of$LISTENER_DATA.company_cloud_auth_tokenlike other tools in the configuration.
import { BaseBrowserToolExecutor } from './base-browser';
app/chrome-extension/entrypoints/background/tools/custom-tools.ts:1
- Another inconsistent variable reference: uses
$tokens.company_cloud_auth_tokeninstead of$LISTENER_DATA.company_cloud_auth_token.
import { BaseBrowserToolExecutor } from './base-browser';
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
app/chrome-extension/entrypoints/background/tools/custom-tools.ts
Outdated
Show resolved
Hide resolved
…onfig.vue Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.