Designing Tools from the Agent's Perspective: A Practical Approach to Skill Engineering

    This article explores skill engineering for AI agents: how engineering teams can design tools by observing agent behavior rather than relying solely on user requirements. It covers the core method of deriving tool design from agent failures, the concept of bidirectional software and latent needs, programmatic tool calling that collapses multi-step operations into a single script execution, clarification-style interactions that balance flexibility and structure, six practical design principles, and metrics for evaluating whether a skill actually works.

    Designing Tools from the Agent’s Perspective: A Practical Approach to Skill Engineering

    In agent systems, a “skill” is rarely a flashy new API. It is a set of tool capabilities that a model can reliably understand, compose, and execute. Many skill design ideas look deceptively simple: eliminate one round trip, ask the question clearly, let a script complete multiple steps in a single run. The real challenge is whether an engineering team can break out of the old “user requirements only” mindset and instead start from the agent’s execution process—observing where it struggles while solving problems, what form of tools it needs, and how the tool’s form in turn affects task outcomes.

    This is the core meaning of “seeing the world like an agent”: not treating the model as a lifeless function caller, but treating the agent as an active executor within a software system. It has its own “requirements”—clear tool descriptions, stable inputs and outputs, recoverable error messages, economical context usage, and composable execution paths. Only by considering both user needs and model needs can tool design move from “usable” to “genuinely good.”

    1. Core Method: Derive Tool Design from the Agent’s Difficulties

    Traditional tool design starts from human usage habits: whether the menu is intuitive, whether the button is visible, whether the workflow is smooth. But an agent does not rely on a visual interface. It relies on tool descriptions, parameter constraints, return values, and error signals in its context. Therefore, the first step of skill design is not writing interfaces—it is observing failures.

    Focus on four categories of problems:

    1. Does the model know which tool to use? Are tool names, descriptions, and parameter boundaries clear enough? Do multiple tools overlap semantically?
    2. Does the model know how to use the tool? Are parameters well-structured, required fields explicit, and return values easy to reason over in the next step?
    3. Is the model using tools economically? Does it call tools repeatedly to accomplish a trivial step? Is irrelevant bulk data being pushed into the context?
    4. Is the model using tools reliably? Are error messages actionable? Can failures be retried or gracefully degraded? Are there irreversible side effects?

    Once a team collects the agent’s failure cases and classifies them into “discovery difficulty, comprehension difficulty, execution difficulty, and recovery difficulty,” directions for tool improvement usually emerge naturally. Skills are not invented out of thin air—they are forced into existence by real execution traces.

    2. Bidirectional Software and Latent Needs

    When building agents, it is easy to fall into one-way thinking: the user states a requirement, and the model calls tools to fulfill it. But an agent system is better understood as “bidirectional software”: the user sits at one end and the model at the other. The user needs results; the model needs an executable path. If a tool only satisfies the business semantics on the user side while ignoring the cognitive burden on the model side, the final behavior may still be unstable.

    “Latent needs” refer to demands the model exhibits during task execution that existing tools do not yet satisfy. For example, if the model repeatedly tries to assemble a complex operation from several simple tools, it needs a higher-level composite tool. If it frequently asks about ambiguous parameters, the interface needs a more structured clarification mechanism. If it loses critical information in a long workflow, intermediate state needs to be externalized or compressed. The team’s job is to observe these behaviors—not to design tools based on subjective imagination.

    3. Programmatic Tool Calling: Collapsing Multi-Step Operations into One Execution

    Each time an agent calls a tool and receives a result, it typically performs a new round of model inference. If a task involves a chain of tool calls, this creates multiple round trips, increasing latency and consuming context space. The idea behind programmatic tool calling is: let the model generate a controlled script that executes multiple low-level operations in a single tool call and returns a summarized result.

    Illustrative pseudocode:

    1. # Pseudocode: execute a multi-step script in one tool call
    2. def handle_task(task):
    3. profile = read_profile(task.user_id)
    4. orders = query_orders(profile.id, task.time_range)
    5. risks = evaluate_risk(orders)
    6. return summarize(profile, orders, risks)

    This script does not grant the model unlimited privileges—it runs inside a controlled runtime. On the engineering side, it requires sandbox isolation, least-privilege permissions, timeout controls, resource limits, audit logging, idempotency design, and error recovery. Its value lies in compressing “multiple inferences + multiple tool round trips” into “one plan + one script execution,” thereby reducing context bloat and interaction overhead.

    An important prerequisite for this approach is that the model’s code generation capability is strong enough to produce relatively stable, verifiable scripts. The engineering team must fully understand the boundaries of model capability before entrusting multi-step operations to script execution. In other words, programmatic tool calling is not merely a technical trick—it is the result of three things maturing together: model capability, runtime governance, and tool abstraction.

    4. Clarification-Style Interaction: Balancing Flexibility and Structure

    Another common skill is “asking the user questions.” It sounds simple but is genuinely hard to design well. If the question is too open, users answer in free text and the model’s downstream parsing cost rises; if it is too structured, it may constrain user expression and lose critical information. Engineering teams often need to weigh flexibility against structure repeatedly.

    Effective designs are usually not either/or, but progressive structure: first present a small set of high-information options, then allow supplementary notes; collect key parameters through structured forms while handling exceptions in natural language; present questions in priority-ordered batches rather than interrupting the user all at once. Modal dialogs, card-style forms, and option-plus-comment patterns all serve the same purpose—reducing ambiguity while preserving room for expression.

    Notably, when a question tool is designed clearly enough, the model tends to show a greater willingness to use it, because it knows exactly “when to ask, what to ask, and how to continue afterward.” This is a reminder: tools must serve not only users but also the model. A model-friendly clarification tool should have explicit trigger conditions, a stable return structure, and a clear path to continue execution.

    5. Six Practical Principles for Skill Design

    1. Discoverability: Tool names and descriptions should point directly at intent; avoid stacking synonymous tools. The model should be able to quickly judge “when to use me” from the context.
    2. Composability: Each tool has a clear responsibility, and its output can be consumed by other tools. Complex workflows are composed via scripts or orchestration, rather than cramming all logic into one giant interface.
    3. Context economy: Return values should be summarized and structured; avoid dumping large blocks of raw data into the context. Provide pagination, references, or on-demand expansion when needed.
    4. Recoverability: Error messages should explain the cause, the impact, and the next action. Distinguish retryable from non-retryable errors so the model does not retry blindly.
    5. Least privilege: Both script execution and tool calls should run within controlled boundaries. Sensitive operations require confirmation, auditing, and rollback strategies.
    6. Observability: Record tool call chains, parameters, result summaries, failure classifications, and latency—use real traces to drive skill iteration.

    6. How to Evaluate Whether a Skill Works

    After a skill ships, “was the call successful” is not enough. A sound evaluation should cover task success rate, number of tool calls, context consumption, end-to-end latency, number of clarification rounds, error recovery rate, user interruption rate, and satisfaction. Offline replay, shadow mode, and A/B-style comparisons can reveal how the same task executes differently under different tool designs.

    Failure classification deserves special attention: did the model fail to discover the tool, fill in the parameters incorrectly, receive an unusable result, or fail to recover after an error? Different failures demand different fixes. If failures concentrate in “discovery difficulty,” improve descriptions and naming; if in “execution difficulty,” simplify parameters and return values; if in “recovery difficulty,” fill in error codes, retry guidance, and degradation paths.

    Conclusion

    The thinking behind skill engineering is no mystery: observe the agent, understand the agent, design tools for the agent, then let the agent use the tools and feed the results back into improvement. Programmatic tool calling addresses execution efficiency and context economy; clarification-style interaction addresses the balance between ambiguity and structure; and “bidirectional software” plus “latent needs” provides the design perspective. What truly sets teams apart is not any single technique, but whether the engineering team is willing to keep learning from the agent’s real behavior—shaping tools into capability units that the model can understand, compose, recover from, and operate under proper governance.