Skip to content

Conversation

@zjh7890
Copy link

@zjh7890 zjh7890 commented Oct 8, 2025

No description provided.

Copy link

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 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.

@hangwin hangwin requested a review from Copilot October 11, 2025 12:13
Copy link

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

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_token instead of $LISTENER_DATA.company_cloud_auth_token like 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_token instead 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.

zjh7890 and others added 5 commits October 12, 2025 10:51
…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>
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