feat: Add LLM provider adapter documentation and examp - #1709
Conversation
- Add comprehensive guide for converting MCP tools to LLM provider formats - Include adapter implementations for Gemini, OpenAI, and Claude - Add runnable example demonstrating all three adapters - Addresses modelcontextprotocol#235
- Add link in docs/index.md Getting Started section - Add entry in mkdocs.yml navigation - Add reference in README.md Advanced Usage section - Register example script in pyproject.toml
- Remove emojis from example file to fix encoding issues - Simplify README snippet to use snippet-source marker - Add missing newlines at end of files - Fixes linting errors in README snippet
- Remove null bytes and extra newlines from files - Ensure files end with exactly one newline - Fix UTF-8 encoding issues in example file
- Remove emoji character that was causing encoding issues - Ensure proper UTF-8 encoding throughout file
- Add provider names to duplicate headings (Basic Implementation, Usage Example) - Fixes MD024/no-duplicate-heading markdownlint errors
- Use Callable from collections.abc instead of lowercase callable - Remove unnecessary isinstance check (dict[str, Any] is always dict) - Add explicit type annotations for variables to satisfy pyright
|
Hi — I'm the author of this PR. After reviewing the current state of Merge status: The PR will have merge conflicts in Issues I plan to fix in a rebase:
The core content ( |
|
Thanks for the PR. The v2 rework changed the code this targets, so it no longer applies as-is. Closing as part of a general backlog cleanup following the v2 release. If this is still relevant against v2, feel free to reopen. |
Summary
This PR addresses #235 by providing comprehensive documentation and examples for creating adapters that convert MCP tool schemas to various LLM provider formats (Gemini, OpenAI, Claude).
Changes
New documentation page (
docs/llm-adapters.md): Comprehensive guide covering:Runnable example (
examples/snippets/clients/llm_adapter_example.py): Demonstrates:Documentation updates: Added references in:
docs/index.md- Getting Started sectionREADME.md- Advanced Usage and Documentation sectionsmkdocs.yml- Navigation menuDesign Decision
Following maintainer feedback, this PR provides documentation and examples rather than official adapter utilities. This approach:
Testing
Related
Closes #235