Skip to main content
Glama
Yarmoluk

ckg-agentforce

by Yarmoluk

route_query

Determines the optimal model and reasoning approach for an AgentForce question by evaluating dependency graph depth, from simple direct lookup to complex structured reasoning.

Instructions

Route an AgentForce question to the optimal model and reasoning approach via graph depth.

The CKG graph IS the router. AgentForce dependency chains (e.g. Einstein Trust Layer → Data Cloud → NVIDIA NIM → Resolution Criteria) have typed hops that signal reasoning complexity deterministically. No heuristic: the graph decides.

Routing table: hop_depth 1 → haiku · direct (simple concept lookup) hop_depth 2 → sonnet · generic_cot (moderate chain) hop_depth 3+ → opus · sparql_cot (deep dependency, structured reasoning)

Args: question: Concept name or natural language question about Salesforce AgentForce.

Returns: model_tier + reasoning_approach + why + context subgraph to inject before LLM call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.1

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description fully discloses the behavioral logic: deterministic routing via graph depth with a clear routing table. It explains that 'No heuristic: the graph decides' and specifies return values, offering complete transparency.

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: a concise summary, then mechanism explanation, routing table, and input/output definitions. It is slightly verbose with 'No heuristic: the graph decides,' but overall efficient and front-loaded.

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

Completeness4/5

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

The description covers purpose, input semantics, algorithmic behavior, and return structure. With an output schema present, the agent can infer return format. It is nearly complete but could mention error handling or input constraints.

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 defines the single parameter 'question' as 'Concept name or natural language question about Salesforce AgentForce,' adding significant meaning beyond the schema's type definition. With 0% schema coverage, this compensates well, though examples could enhance clarity.

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 explicitly states the tool's function: 'Route an AgentForce question to the optimal model and reasoning approach via graph depth.' It uses a specific verb ('route') and resource ('AgentForce question'), and the routing table distinguishes it from siblings.

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

Usage Guidelines3/5

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

The description implies usage for routing questions based on graph depth but lacks explicit guidance on when to choose this tool over siblings like 'query_ckg' or 'verify_source'. No 'when not to use' or alternative comparisons are provided.

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