Skip to main content
Glama

Get first matching record

get_first_record

Fetch the first record that matches a PocketBase filter expression. Use for direct lookups such as finding a user by email, with an error if no record exists.

Instructions

Return the first record matching a filter expression (throws if none found). Convenient for lookups like 'email = "a@b.com"'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expandNoComma-separated relations to expand.
fieldsNoComma-separated fields to return.
filterYesPocketBase filter expression to match.
collectionYesCollection id or name.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It discloses a key behavior: the call throws if no matching record is found, and it clarifies that only the first match is returned. It does not specify the ordering that determines 'first,' which is a minor transparency gap.

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?

Two tight sentences: the first states the operation and exception, the second gives a practical use case. No filler or redundant restating of the schema.

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?

For a low-complexity read tool with fully documented parameters, the description covers the core behavior, exception, and a usage example. The main missing piece is the ordering semantics behind 'first,' and there is no output schema to clarify the return shape, but the tool remains callable without further info.

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?

All four parameters are already described in the schema, so the baseline is 3. The description adds value by giving a concrete filter expression example ('email = "a@b.com"') and by framing the filter as a lookup predicate, which clarifies expected usage.

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?

The description names a specific verb and resource: 'Return the first record matching a filter expression.' It also adds the throw-if-not-found behavior, making the operation's scope clear. It does not explicitly contrast with sibling tools like get_record or list_records, so it stops short of a 5.

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?

'Convenient for lookups like...' gives a concrete use case, implying this tool is for retrieving a single expected match by filter. It does not state exclusions or name alternative tools, but the context is sufficient for an agent to choose it for simple lookups.

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

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/nestebe/pocketbase-mcp'

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