Skip to main content
Glama

suggest_next

Predicts the next most useful tool to call based on historical session patterns and workflow analysis, improving efficiency by anticipating user needs.

Instructions

Suggest the most useful next tool based on learned session patterns.

Analyzes historical usage events to predict what tool agents typically call next.
When prev_tool is provided, uses second-order Markov (prev→current→next) which is
significantly more accurate than first-order on repeated workflows.

Example: suggest_next(current_tool='focus', prev_tool='overview') returns
'hotspots (100%)' instead of the less certain 'hotspots (58%)' from first-order.

repo_path: absolute path to repository
current_tool: the tool you just called (e.g. 'focus', 'overview')
prev_tool: the tool called before current_tool (optional; enables second-order prediction)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYes
current_toolNo
prev_toolNo
output_formatNotext

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Elmoaid/TempoGraph'

If you have feedback or need assistance with the MCP directory API, please join our Discord server