How to Evaluate the Tool-Calling Capability of New-Generation LLM Agents

    This article examines how modern LLM agents have moved from generating scattered shell snippets to issuing structured, parallel tool calls in a single step. It explains why step-level efficiency is the key indicator of agent capability, analyzes how constraints are injected into tool parameters through prompt engineering, and offers practical advice for making agents perform reliably, including environment briefings, structured tools, explicit dependency boundaries, verification loops, and comparative benchmarking.

    1. Observation: From “Clumsy Scripts” to “Structured Parallel Calls”

    When using LLM-driven development assistants for complex engineering tasks, many developers share a common pain point: older-generation models, when facing multi-file, multi-constraint editing jobs, tend to generate fragmented command-line scripts piece by piece—for example, using a long string of string concatenation, regex replacements, or even ad-hoc bash snippets to modify files. This approach is not only hard to read, but each step also completes only a small portion of the work, splitting the task into fragments. Intermediate states are difficult to verify, and rolling back after an error is costly.

    Newer models behave very differently: after a small amount of prompt tuning, they can issue multiple structured tool calls in parallel within a single execution step, describing declaratively which fragments of which files they want to read or modify simultaneously. A typical call looks like this:

    1. const [authHunk, ch07PreHunk, ch07StalkHunk] =
    2. await Promise.all([
    3. hunkFrom("notes/AUTHORING.md", 173, 243, [...]),
    4. // Fetch specified fragments of multiple files in parallel
    5. ]);

    This kind of call shows that the model has understood three key things:

    • The task is parallelizable: three independent read/edit operations don’t need to wait for each other serially.
    • Operations need boundaries: precisely scope target fragments by line ranges rather than crudely replacing whole files.
    • Constraints must be passed explicitly: hand editing rules and format requirements to the tool as structured parameters instead of gambling on them being picked up from natural language.

    When I first saw a model spontaneously produce this kind of call, my reaction was stunned disbelief. This is no longer code completion—it is task planning.

    2. Why “Doing More per Step” Is the Core Indicator of a Capability Leap

    When evaluating a model in agentic scenarios, many people focus on single-turn QA quality. But in real engineering, the more important metric is information density and progress per step. There are three reasons:

    1. Reducing State Explosion

    Agent reliability degrades as the number of steps increases. Every additional step means one more context transfer and one more opportunity for errors. If a model can complete in one step what previously took five, overall success rates improve significantly, with fewer intermediate states and a smaller debugging surface.

    2. Explicit Declarations Beat Implicit Scripts

    Scattered bash concatenation is “imperative” thinking: the model tries to simulate a human typing commands, which is fragile and hard to audit. Structured tool calls are “declarative” thinking: the model describes goals and constraints, and the tool layer guarantees execution semantics. For example, “apply these editing rules to lines 173–243 of a configuration file”—the tool layer can validate line numbers, preview diffs, and atomically roll back on failure. These are guarantees that script concatenation cannot get for free.

    3. Parallel Calls Test Depth of Task Understanding

    Only when a model has truly understood the task structure—identifying which sub-operations are independent—can it safely parallelize. This requires reasoning akin to data-flow analysis: judging dependencies, partitioning parallelizable units, and determining how to aggregate results. This is an order of magnitude harder than writing code serially.

    3. Case Study: “Constraints as Context” in Prompt Engineering

    Looking at the constraint lists carried in a single high-quality model call, we can extract reusable prompt-engineering lessons. These constraints were not written by the user one by one; the model automatically distilled and injected them into tool parameters under prompt guidance. Typical categories include:

    (1) Hard formatting rules. For example, conventions for a typesetting tool’s math mode: “mathematical content must be wrapped in math mode; do not wrap formulas in inline code”; “multi-letter operators must be quoted or use the op(...) form to ensure upright rendering.” The key feature of these rules is that they are machine-verifiable and violations cause rendering errors—passing them as structured constraints is far more effective than leaving them scattered across a conversation.

    (2) Lists of known pitfalls. For example: “use overline(...) instead of bar(...), because the latter renders as a vertical line”; “when a letter-initial subscript is followed by a parenthesis, insert a space or group with braces, otherwise the subscript will swallow the argument”; “apostrophes should be placed on the base, before the subscript.” These are lessons distilled by human experts from painful experience. A model’s ability to reuse them in structured form shows it has internalized the principle that “constraints must flow together with the operation.”

    (3) Modularity and consistency requirements. For example: “uniformly use the shared templates’ exported environments and table components; do not hand-draw table vertical lines.” This reflects respect for project-level conventions—every file modification must conform to the whole repository’s style, not merely be locally self-consistent.

    (4) Verification gates. Most notably, the end of the constraint list includes a “verification gate”: every edit must pass a validation process. This is a key design for agent reliability—planning, execution, and verification as a unified loop, not just execution with no regard for outcomes.

    4. Practical Advice: How to Make the Model Perform This Way Reliably

    Based on my experience, here are actionable recommendations:

    1. Provide an environment briefing before the task. Start the prompt with a concise “project rule card”: directory structure, shared module list, hard formatting rules, and prohibited actions. With this foundation, the model will proactively carry constraints in subsequent calls.

    2. Offer structured tools rather than a pure command-line channel. If your agent framework only exposes a single shell-execution tool, even a smart model can only write bash. Design editing tools with explicit parameters (file, line ranges, rule lists) to guide the model toward declarative calls.

    3. Encourage parallelism but require explicit dependency boundaries. Tell the model in the prompt to “merge independent operations into the same step” while requiring it to explicitly state why certain operations cannot be parallelized. This significantly improves per-step efficiency.

    4. Enforce a verification loop. Require a diff summary and a validation call after every modification, preventing silent “seemingly complete but actually broken” errors.

    5. Benchmark models comparatively to grade their capability. A simple, practical test: give two models the same multi-file editing task and measure the number of steps required and the structural quality of each step’s calls. A model that uses fewer steps, has clearly structured parameters, and automatically carries project constraints is the one that’s genuinely usable in agentic scenarios.

    5. Conclusion

    The evolution of tool calling in newer models—from “writing a pile of clumsy scripts” to “single-step structured parallel calls”—is essentially a shift from code-completion capability to task-planning and constraint-management capability. For developers, this suggests we should invest more in constraint modeling within prompts and in the design of agent-framework tools, giving the model’s structured reasoning room to shine. Going forward, the difference between models will increasingly be measured not by “can it write this piece of code,” but by “can it compress the organization and verification of a hundred pieces of code into one rigorous, declarative step.”