Skip to content

types/docs: add compact message reprs and clarify plugin MCP permissions#808

Open
however-yir wants to merge 1 commit intoanthropics:mainfrom
however-yir:fix-78-448-repr-plugin-permissions
Open

types/docs: add compact message reprs and clarify plugin MCP permissions#808
however-yir wants to merge 1 commit intoanthropics:mainfrom
however-yir:fix-78-448-repr-plugin-permissions

Conversation

@however-yir
Copy link
Copy Markdown

Summary

  • add compact __repr__ implementations for message/content block dataclasses so streamed messages are readable without custom helper formatting
  • add a README section clarifying plugin MCP permission behavior:
    • plugin MCP tools still go through the standard permission pipeline
    • they do not bypass permission_mode, can_use_tool, or hooks
    • allowed_tools controls auto-approval
  • add test coverage for compact message repr behavior

Issues addressed

Testing

  • python -m pytest tests/test_types.py

@however-yir
Copy link
Copy Markdown
Author

Hi maintainers, friendly ping for review.

This PR addresses #78 and #448 by:

  • adding compact, readable __repr__ implementations for message/content dataclasses
  • clarifying plugin MCP permission behavior in README (standard permission pipeline, no bypass)
  • adding/covering repr behavior in tests/test_types.py

Validation run:

  • python -m pytest tests/test_types.py (passes locally)

Happy to trim or reshape the repr output if you prefer a different style.

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.

Unclear Documentation: Do Plugin MCP Servers Automatically Receive Permissions? Support reprs for message types

1 participant