Skip to main content
Glama

FindProperties

Search and filter properties in the RushDB database using specific criteria, with options to limit results, skip records, and sort output.

Instructions

Find properties in the database using a search query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of properties to return
orderByNoSorting configuration: key = field, value = asc|desc
skipNoNumber of properties to skip
whereNoSearch conditions for finding properties

Implementation Reference

  • The main handler function that executes the tool logic by constructing a search query and fetching properties from the database using db.properties.find().
    export async function FindProperties(params: { where?: Record<string, any> limit?: number skip?: number orderBy?: Record<string, 'asc' | 'desc'> }) { const { where, limit, skip, orderBy } = params const searchQuery: Record<string, any> = {} if (where) searchQuery.where = where if (limit) searchQuery.limit = limit if (skip) searchQuery.skip = skip if (orderBy && Object.keys(orderBy).length > 0) searchQuery.orderBy = orderBy const result = await db.properties.find(searchQuery) return result.data }
  • The input schema and metadata for the FindProperties tool as part of the tools registry.
    { name: 'FindProperties', description: 'Find properties in the database using a search query', inputSchema: { type: 'object', properties: { where: { type: 'object', description: 'Search conditions for finding properties' }, limit: { type: 'number', description: 'Maximum number of properties to return', default: 10 }, skip: { type: 'number', description: 'Number of properties to skip', default: 0 }, orderBy: { type: 'object', description: 'Sorting configuration: key = field, value = asc|desc', additionalProperties: { type: 'string', enum: ['asc', 'desc'] } } }, required: [] } },
  • index.ts:427-442 (registration)
    The registration and dispatch logic in the MCP CallToolRequest handler that invokes the FindProperties tool.
    case 'FindProperties': const foundProperties = await FindProperties({ where: args.where as Record<string, any> | undefined, limit: args.limit as number | undefined, skip: args.skip as number | undefined, orderBy: args.orderBy as Record<string, 'asc' | 'desc'> | undefined }) return { content: [ { type: 'text', text: foundProperties.length > 0 ? JSON.stringify(foundProperties, null, 2) : 'No properties 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