Skip to main content
Glama

java_get_table

Read-only

Reads a Java table in pages via the JVM accessibility interface, returning cell text and row/column counts so agents can inspect large tables without loading every row.

Instructions

Read a Java table, a page of rows at a time.

Use this on a handle for a table element -- from java_snapshot or java_find. This is the tool a platform-level automation cannot replace: it reads the table's own accessibility interface, so cell text, row and column counts come from the JVM rather than from pixels or from a bridge that does not carry them.

It never returns the whole table. A large table is 200 rows in pyjab's own test application and thousands in a real one, so the read is paged by row_start and bounded by row_count and max_cells, and the reply says what it left out and how to ask for it.

Cells are not just text. A cell with no text interface is shown as -, and a cell that could not be read is shown as ? with a count: "this cell has no text" and "I could not read this cell" are different answers, and reporting the second as the first would invent an empty table.

Args: session_id: From java_attach_window. handle: A handle for the table element. row_start: First row to read, 0-based. row_count: How many rows to read. max_cells: Hard cap on cells read in one call, whatever the rows ask for.

Returns: The table's row and column counts, then one line per row, then what was left out.

Errors: is_error for an unknown handle, an element that changed since the snapshot, or an element that is not a table -- which is reported with what it is instead, so a wrong handle and a stale handle do not look the same.

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>",
      "handle": "<handle>"
    },
    "name": "java_get_table"
  }
}

Input Schema

NameRequiredDescriptionDefault
handleYes
max_cellsNo
row_countNo
row_startNo
session_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds substantial behavior beyond them. It discloses that the read is always paged, explains the `-` (no text interface) versus `?` (unreadable, with count) distinction and why conflating them would fabricate an empty table, and enumerates the is_error conditions: unknown handle, stale element, and non-table handle.

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 purpose, then preconditions, then the paging model, then structured Args/Returns/Errors sections — easy to scan. A few sentences are rhetorical rather than informational ('This is the tool a platform-level automation cannot replace'), which is defensible as differentiation but adds length.

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?

An output schema exists, yet the description still sketches the reply shape (row/column counts, one line per row, what was left out) and explains error semantics, so an agent knows both how to page and how to interpret partial results. Nothing needed to invoke this correctly against a 5-parameter paged read is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the load and it does: an Args block defines all five parameters, including that row_start is 0-based, row_count is the rows to read, max_cells is a hard cap that overrides the row request, session_id comes from java_attach_window, and handle must reference a table element. That is meaning well beyond bare titles and defaults.

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?

Opens with a specific verb and resource plus its access pattern: 'Read a Java table, a page of rows at a time.' It then distinguishes itself from the element/text siblings by stating it reads the table's own accessibility interface, so cell text and row/column counts come from the JVM rather than from pixels or a non-carrying bridge.

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?

It states the precondition clearly: use this on a handle for a `table` element obtained from java_snapshot or java_find, which implicitly routes non-table handles elsewhere. It does not explicitly name what to call for a non-table element (e.g. java_get_text), though the error section tells the agent a non-table handle is reported with what the element actually is.

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