Skip to content

Feature:add mcp approval response schema#424

Merged
rayrayraykk merged 2 commits intoagentscope-ai:mainfrom
PengJiazhen408:feature/mcp_approval
Jan 28, 2026
Merged

Feature:add mcp approval response schema#424
rayrayraykk merged 2 commits intoagentscope-ai:mainfrom
PengJiazhen408:feature/mcp_approval

Conversation

@PengJiazhen408
Copy link
Copy Markdown
Contributor

Description

[Describe what this PR does and why]

Related Issue: Fixes #[issue_number] or Relates to #[issue_number]

Security Considerations: [If applicable, especially for sandbox changes]

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring

Component(s) Affected

  • Engine
  • Sandbox
  • Tools
  • Common
  • Documentation
  • Tests
  • CI/CD

Checklist

  • Pre-commit hooks pass
  • Tests pass locally
  • Documentation updated (if needed)
  • Ready for review

Testing

[How to test these changes]

Additional Notes

[Optional: any other context]

@PengJiazhen408 PengJiazhen408 requested a review from a team January 26, 2026 06:45
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @PengJiazhen408, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the system's capability to manage multi-agent interactions by introducing a dedicated schema for MCP approval responses. This new data structure ensures consistent communication of approval decisions, which is vital for the reliable operation of agents requiring explicit consent or confirmation. The change primarily focuses on defining the necessary fields to capture the outcome and context of an approval request.

Highlights

  • New Schema Definition: Introduced a new McpApprovalResponse class within agent_schemas.py to standardize the structure of approval responses in the Multi-Agent Communication Protocol (MCP) system.
  • Approval Response Fields: The McpApprovalResponse schema includes essential fields such as approval_request_id (string), approve (boolean), and optional fields id (string) and reason (string) for detailed decision context.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@cla-assistant
Copy link
Copy Markdown

cla-assistant bot commented Jan 26, 2026

CLA assistant check
All committers have signed the CLA.

@cla-assistant
Copy link
Copy Markdown

cla-assistant bot commented Jan 26, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new Pydantic schema, McpApprovalResponse, for handling MCP approval responses. The schema is well-defined, but I've found a small but important documentation issue in a docstring that needs to be corrected to avoid confusion.

Comment thread src/agentscope_runtime/engine/schemas/agent_schemas.py Outdated
@rayrayraykk rayrayraykk merged commit f83ec48 into agentscope-ai:main Jan 28, 2026
7 checks passed
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.

2 participants