Skip to main content
Glama

java_fill_form

Destructive

Fills multiple fields in a single Java form call and reports the outcome for every field, including failures, so you can verify partial completion without one round trip per field.

Instructions

Fill several fields in one call: a list of {"handle": ..., "value": ...}.

A form is usually several fields, and setting them one at a time costs a round trip each. This is the same verification and the same typing, applied in order, with one reply that says what happened to every field.

It does not stop at the first failure. A form that is half filled with no report is worse than one that is half filled with one: every field is attempted, and each line says whether it worked and why not.

Args: session_id: From java_attach_window. fields: [{"handle": "e:1a2b", "value": "admin"}, ...], applied in order. simulate: Type real keystrokes instead of using the accessibility action.

Returns: One line per field — set, or the reason it was not — and a count.

Errors: is_error only for an unknown session, an empty list, or a malformed entry. A field that fails is reported in the reply, because that is a result rather than a failed call.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session_id": "<session_id>",
      "fields": "<fields>"
    },
    "name": "java_fill_form"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldsYes
simulateNo
session_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the destructiveHint/openWorldHint annotations by disclosing the key non-obvious trait: it does not stop at the first failure, every field is attempted, and per-field results are returned. It also scopes `is_error` precisely to unknown session, empty list, or malformed entry, so the agent knows partial failures are results, not call failures.

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?

Front-loaded with the batching purpose and closed with Args/Returns/Errors structure. The second paragraph's aphorism ('A form that is half filled with no report is worse...') restates the point already made, but the rest earns its space.

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

Completeness5/5

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

For a mutating, multi-field tool with no schema descriptions, the definition covers invocation semantics, ordering, failure behavior, and error boundaries. An output schema exists, and the Returns note is a harmless restatement rather than a gap.

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?

Schema description coverage is 0%, so the description carries the burden and largely meets it: `session_id` is traced to java_attach_window, `fields` is shown as a concrete handle/value example with in-order application, and `simulate` is explained as real keystrokes versus the accessibility action. Minor gap: no detail on the handle format ('e:1a2b') beyond the example, or accepted value types.

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

Purpose4/5

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

States a specific verb and resource ('Fill several fields in one call') and frames the batch semantics against the one-at-a-time cost of a round trip per field. It never names java_set_text as the single-field alternative, so sibling differentiation is implied rather than explicit.

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?

Makes the selection condition clear: several fields should be filled together rather than one at a time, and `simulate` is offered as an alternate typing path. It gives no explicit when-not-to-use condition (e.g. single field, or fields requiring intermediate verification).

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