Skip to main content
Glama

get_layer

Retrieve detailed metadata and optional data statistics or raw values for a napari layer by name, including shape, dtype, scale, and type-specific properties.

Instructions

Get detailed info about a layer, optionally including data.

Always returns metadata (shape, dtype, scale, translate, type-specific properties). When include_data=True or slicing is provided, also returns statistics and/or raw data values.

Parameters

name : str Layer name (exact match). include_data : bool, default False If True, include data statistics (min/max/mean/std) and, for small layers, inline data values. slicing : str, optional Numpy-style index string, e.g. "0, :5, :5". Implies include_data=True. max_elements : int, default 1000 Maximum number of data elements to return inline. Larger data is stored and an output_id returned for read_output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
include_dataNo
slicingNo
max_elementsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries full burden. It discloses that metadata is always returned, and data statistics/inline values are included when include_data or slicing is provided. It also mentions that large data returns an output_id for use with read_output. This is good behavioral disclosure, though it omits error behavior (e.g., invalid name).

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 concise and well-structured: a summary sentence followed by a clear parameter list. Every sentence adds value, and the format is easy to parse. It is appropriately sized for the tool.

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

Completeness4/5

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

Given the complexity (4 parameters, output schema exists), the description covers input semantics well. It mentions expected output fields (shape, dtype, etc.) but does not detail the output schema structure (though output schema exists). The description is complete enough for an AI agent to use correctly.

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?

Despite 0% schema description coverage, the description provides detailed parameter semantics: name (exact match), include_data (controls statistics and inline values), slicing (numpy-style index, implies include_data), and max_elements (threshold for inline vs stored data). This adds significant meaning beyond the schema.

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 clearly states 'Get detailed info about a layer, optionally including data.' This is a specific verb+resource that distinguishes it from siblings like list_layers (list all) and read_output (retrieve stored data). The purpose is unambiguous.

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

Usage Guidelines2/5

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

The description does not guide when to use this tool versus alternatives like list_layers or read_output. It explains parameters but lacks context for choosing between get_layer and sibling tools. No explicit when-to-use or when-not-to-use guidance.

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/royerlab/napari-mcp'

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