Skip to main content
Glama

FindUniqRecord

Locate a specific record in RushDB's graph database using search criteria and label filters to identify unique data entries.

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 core handler function that performs a unique record lookup using the database client with optional labels and where conditions.
    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
    }
  • Tool schema definition including name, description, and input validation schema for the FindUniqRecord tool.
    {
      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)
    Registration and dispatching logic in the MCP server handler that calls the FindUniqRecord tool function based on the 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.'
          }
        ]
      }
  • index.ts:72-75 (registration)
    Server registration for listing tools, which includes the FindUniqRecord schema via the imported tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools
      }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'unique record' but does not clarify what happens if multiple records match (e.g., throws an error, returns first), nor does it discuss permissions, rate limits, or response format. This leaves significant gaps for a tool that likely queries data.

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

Conciseness4/5

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

The description is a single, efficient sentence that states the core purpose without unnecessary words. It is appropriately sized for a simple tool, though it could be more front-loaded with differentiation from siblings to improve clarity.

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

Completeness2/5

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

Given the complexity of a search tool with no annotations and no output schema, the description is incomplete. It lacks details on behavior (e.g., uniqueness enforcement, error handling), usage context, and return values, making it inadequate for an agent to use this tool effectively without guesswork.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters ('labels' and 'where'). The description adds no additional meaning beyond implying search criteria, which is redundant with the schema. Baseline 3 is appropriate as the schema handles parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose as 'Find a unique record that matches the given search criteria,' which is clear but vague. It specifies the verb 'find' and resource 'unique record,' but does not differentiate it from siblings like 'FindOneRecord' or 'FindRecords,' leaving ambiguity about what makes this tool distinct.

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 provides no guidance on when to use this tool versus alternatives. It does not mention when to choose 'FindUniqRecord' over similar tools like 'FindOneRecord' or 'FindRecords,' nor does it specify any prerequisites or exclusions for its use.

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/rush-db/RushDB'

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