Skip to main content
Glama

get_layer_schema

Retrieve vector layer field details including name, type, length, precision, and optionally distinct values and numeric min/max for specified fields.

Instructions

Describe a vector layer's fields.

Always returns each field's name, type, length, and precision. For any field name passed in fields, also returns a capped sample of distinct values (with a total count) and, for numeric fields, the min/max. Requesting distinct values on every field on a large layer is expensive, so pass only the fields you actually need to reason about.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsNo
layer_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Discloses that it always returns certain fields, conditionally returns distinct values and min/max for specified fields, and mentions performance implications. Since no annotations exist, the description fully carries the behavioral disclosure burden.

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?

Three sentences, front-loaded with purpose, each sentence provides essential information without redundancy. No fluff.

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?

Covers input parameters, output behavior, and performance considerations adequately. Lacks details on error cases or exact sample cap size, but overall sufficient given the output schema exists.

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?

Adds significant meaning beyond the schema: explains the fields parameter's effect, the extra data returned, and the performance cost. The schema has 0% description coverage, so the description compensates completely.

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?

Clearly states 'Describe a vector layer's fields' with specific details on return values (name, type, length, precision) and conditional additional info (distinct values, min/max), distinguishing it from sibling tools like get_layer_sample and attributes_list_fields.

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?

Provides explicit guidance on the fields parameter: 'pass only the fields you actually need to reason about' and warns about cost of requesting many distinct values. However, does not explicitly contrast with alternative tools.

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/piatkowski/qgis-mcp'

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