home / skills / trpc-group / trpc-agent-go / plan_route
This skill plans a route and returns distance and ETA in a deterministic JSON format for reliable agent planning.
npx playbooks add skill trpc-group/trpc-agent-go --skill plan_routeReview the files below or copy the command above to add this skill to your agents.
---
name: plan_route
description: Plan a route and return distance + ETA (schema + deterministic result).
---
# plan_route
This skill is used by the dynamic structured output demo.
## Output JSON Schema
```json
{
"type": "object",
"properties": {
"route": {
"type": "string",
"description": "Route name"
},
"distance_km": {
"type": "number",
"description": "Distance in kilometers"
},
"eta_min": {
"type": "integer",
"description": "ETA in minutes"
}
},
"required": [
"route",
"distance_km",
"eta_min"
],
"additionalProperties": false
}
```
## Commands
Print JSON result to stdout:
```bash
cat result.json
```
This skill plans a route and returns a deterministic JSON result containing the route name, total distance in kilometers, and ETA in minutes. It is designed for programmatic use where a strict JSON schema is required for downstream processing. The output is concise and machine-readable for integration with agent systems or travel tools.
Given origin and destination context from the caller, the skill computes a single route, estimates the distance in kilometers, and calculates an ETA in minutes. It then emits a JSON object that strictly follows the provided schema: route, distance_km, and eta_min. The result is deterministic and suitable for automated workflows that require predictable structured output.
What does the route field contain?
The route field contains a concise route name or identifier describing the path returned by the planner.
Are units fixed in the output?
Yes. distance_km is in kilometers (number) and eta_min is in minutes (integer) to ensure consistent, machine-readable values.