Skip to main content
Glama

FindUniqRecord

Locate a specific database record using search criteria and label filters to retrieve unique data entries from your graph database.

Instructions

Find a unique record that matches the given search criteria

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelsNoFilter by record labels
whereNoSearch conditions for finding the unique record

Implementation Reference

  • The main handler function implementing the tool logic: finds a unique record matching the given labels and where conditions using the database API.
    export async function FindUniqRecord(params: { labels?: string[]; where?: Record<string, any> }) { const { labels, where } = params const result = await db.records.findUniq({ ...(labels && { labels }), ...(where && { where }) }) return result?.data || null }
  • Input schema and metadata definition for the FindUniqRecord tool, used for validation and tool listing.
    { name: 'FindUniqRecord', description: 'Find a unique record that matches the given search criteria', inputSchema: { type: 'object', properties: { labels: { type: 'array', items: { type: 'string' }, description: 'Filter by record labels' }, where: { type: 'object', description: 'Search conditions for finding the unique record' } }, required: [] } },
  • index.ts:382-394 (registration)
    Tool dispatch/registration in the MCP server CallToolRequest handler: imports and calls the FindUniqRecord function based on tool name.
    case 'FindUniqRecord': const foundUniqRecord = await FindUniqRecord({ labels: args.labels as string[] | undefined, where: args.where as Record<string, any> | undefined }) return { content: [ { type: 'text', text: foundUniqRecord ? JSON.stringify(foundUniqRecord, null, 2) : 'No unique record found.' } ] }

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/1pxone/RushDB'

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