@devries-cameron20 / composio Mirror · read-only / commits / 54cccb638
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 02:00 UTC

docs: fix Python custom tools references (#3022)

## Summary - add generated Python SDK reference pages for `ToolRouterSession` and `SessionContextImpl`, and wire them into the Python SDK reference index/meta - update the custom tools docs page to link to those real Python pages instead of the generic Python SDK index or Tool Router API reference - keep the Python/TypeScript `parameters` examples aligned on `in` - align the generated Python session/session-context pages more closely with the TypeScript counterparts by including the relevant properties and complete return-type sections ## Generator Changes - add `ToolRouterSession` and `SessionContextImpl` to `ADDITIONAL_CLASSES` in `python/scripts/generate-docs.py` so they are emitted as public Python SDK reference pages - extend the Python docs generator so those additional public classes can render `## Properties` tables, instead of only rendering properties for the root `Composio` page - regenerate: - `docs/content/reference/sdk-reference/python/tool-router-session.mdx` - `docs/content/reference/sdk-reference/python/session-context-impl.mdx` ## Source Metadata Cleanup For Generation - tighten `ToolRouterSession.toolkits()` from `Any` to `ToolkitConnectionsDetails` so the generated Python page includes the correct `Returns` section - tighten `ToolRouterSession.search()` from `Any` to `SessionSearchResponse` for the same reason - add doc metadata for the public `ToolRouterSession` properties used in the generated page: `session_id`, `mcp`, and `experimental` - add a docstring to `SessionContextImpl.user_id` so the generated property table has a real description These source changes are intended to improve generated documentation and static typing only; they do not change runtime behavior. ## Why The previous docs pass added section-level references, but the Python side still did not expose equivalent generated reference pages for the session and session-context APIs. This PR makes those Python references real, points the guide at the correct targets, and keeps the generated Python pages consistent with the TypeScript reference surface for the custom-tools flow. ## Verification - regenerated Python SDK docs with `uv run --with griffe python scripts/generate-docs.py` - verified `session.custom_tools()` / `session.custom_toolkits()` coverage with: `uv run --with pytest pytest tests/test_custom_tools.py -q -k 'custom_tools_list or custom_tools_filter or custom_toolkits_list'`

Dhawal Upadhyay committed Mar 25, 2026 at 17:12 UTC 54cccb638faa78e709569f44535a2d9084c3c038

No changes.