Skip to main content
Glama

peek_array

Read a small slice from an HDF5 dataset to inspect raw values when SQL-based tools are unavailable. Get dtype, shape, sample data, units, and valid range.

Instructions

Read a small slice from one HDF5 dataset (the missing companion to check_arrays).

    HDF5 sources don't have SQL views, so `sample_rows` / `run_sql` can't
    inspect them. Use this to read raw values.

    `path` accepts either:
      - an absolute h5py path like `/gdb11_s08/molecule_1/coordinates`, or
      - a leaf name like `coordinates`, which resolves to the first match
        and reports other matching paths in `other_matches`.

    `n` controls how many rows along the leading axis to return (default 5;
    capped at ~500 values total for payload safety).

    Output: dtype, full shape, returned slice shape, JSON-safe values,
    plus `units` and `valid_range` if declared as HDF5 attributes.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNo
pathYes
source_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries the full burden. It discloses path resolution behavior (absolute path vs. leaf name, first-match with other_matches), n default and payload cap (~500 values), and output contents (dtype, full shape, JSON-safe values, units, valid_range). This exceeds typical transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: main purpose, usage rationale, parameter specifics, and output summary. Each sentence adds necessary detail, and the format uses bullet-like breaks for readability without redundancy.

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?

Despite having an output schema, the description elaborates on output fields (dtype, shape, JSON-safe values, attributes) and includes safety constraints. It covers path edge cases and fallback behavior, making it complete for a read-only inspection tool.

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 must define parameters. It thoroughly explains 'path' (two accepted forms) and 'n' (row count, default 5, cap). 'source_id' is only implied by context (identifying the HDF5 source), not explicitly described, a minor gap.

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?

The description opens with a specific verb and resource: 'Read a small slice from one HDF5 dataset'. It also distinguishes itself from siblings by calling itself 'the missing companion to check_arrays' and contrasting with sample_rows/run_sql, which cannot inspect HDF5 sources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states when to use this tool: HDF5 sources don't have SQL views, so sample_rows/run_sql can't inspect them. It directly says 'Use this to read raw values,' providing clear context and an implicit alternative comparison.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/charliecpeterson/edamcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server