Skip to content

Improve AgentKit get_tools pagination defaults #150

@saif-at-scalekit

Description

@saif-at-scalekit

Problem

AgentKit framework helpers such as actions.langchain.get_tools() and actions.google.get_tools() accept page_size=None by default. The service default is 10 tools, so connectors with more than 10 tools can appear incomplete.

The helpers return framework-ready tool lists and do not expose pagination metadata such as next_page_token or total_size, so developers do not get a signal that the result set was truncated. This caused confusion for connectors such as Slack, where a newly enabled tool may be beyond the first default page.

Verified current behavior

  • scalekit/actions/frameworks/langchain.py defines get_tools(..., page_size: Optional[int] = None, page_token: Optional[str] = None) and passes those values to self.tools.list_scoped_tools(...).
  • scalekit/actions/frameworks/google_adk.py has the same default and behavior.
  • Lower-level actions.tools.list_scoped_tools(...) returns the response tuple with pagination metadata and can be called with page_size=100.

Suggested fix

  • Make framework get_tools() helpers default to page_size=100, or otherwise emit a clear warning/metadata path when the first page may be truncated.
  • Update docstrings to recommend page_size=100 for tool discovery.
  • Keep actions.tools.list_scoped_tools(identifier=..., page_size=100, filter=ScopedToolFilter(...)) documented as the lower-level discovery API when callers need pagination metadata.

Developer impact

A developer should not need to know about the default page size to discover all tools for a connector.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions