Skip to main content
Glama

suggest_next

Predicts the next tool to call by analyzing historical usage patterns. Use it to streamline your workflow by suggesting the most likely next action, with optional second-order accuracy using previous tool context.

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
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description explains the analytical process (Markov chains, first-order vs second-order) and example outputs, but since no annotations are provided, it does not disclose whether the tool is read-only or requires specific permissions, though it is implied to be non-destructive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear statement, technical details, example, and parameter explanations. It is appropriately sized, though slightly verbose in parts.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the algorithm and usage well but lacks explicit description of the output format and prerequisites (e.g., indexed repo). Given the presence of an output schema, the description could still clarify the return structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaning for three of four parameters: repo_path as absolute path, current_tool as the tool just called, and prev_tool as optional for second-order prediction. Output_format is not described, but defaults cover it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool suggests the next most useful tool based on learned session patterns and distinguishes it from siblings by explaining second-order Markov accuracy, supported by an example.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on how to use the prev_tool parameter for better accuracy and gives an example, but does not explicitly state when to avoid this tool or mention alternatives among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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