PropertyValues
Retrieve and filter property values from RushDB using property ID, search queries, and sorting options to access structured data efficiently.
Instructions
Get values for a specific property
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max number of values to return | |
| orderBy | No | Ordering for value results | |
| propertyId | Yes | ID of the property to get values for | |
| query | No | Optional search query for filtering values | |
| skip | No | Number of values to skip |
Implementation Reference
- tools/PropertyValues.ts:17-35 (handler)The core handler function that implements the PropertyValues tool logic by destructuring parameters, building a search query, querying the database for property values, and returning the result data.export async function PropertyValues(params: { propertyId: string query?: string orderBy?: 'asc' | 'desc' limit?: number skip?: number }) { const { propertyId, query, orderBy, limit, skip } = params const searchQuery: Record<string, any> = {} if (query) searchQuery.query = query if (orderBy) searchQuery.orderBy = orderBy if (limit) searchQuery.limit = limit if (skip) searchQuery.skip = skip const result = await db.properties.values(propertyId, searchQuery) return result.data }
- tools.ts:373-384 (schema)The JSON schema defining the input parameters for the PropertyValues tool, including required propertyId and optional query, orderBy, limit, skip.description: 'Get values for a specific property', inputSchema: { type: 'object', properties: { propertyId: { type: 'string', description: 'ID of the property to get values for' }, query: { type: 'string', description: 'Optional search query for filtering values' }, orderBy: { type: 'string', enum: ['asc', 'desc'], description: 'Ordering for value results' }, limit: { type: 'number', description: 'Max number of values to return' }, skip: { type: 'number', description: 'Number of values to skip' } }, required: ['propertyId'] }
- tools.ts:371-385 (registration)The registration entry for the PropertyValues tool in the tools array, including name, description, and input schema, used by the MCP server to list and validate tools.{ name: 'PropertyValues', description: 'Get values for a specific property', inputSchema: { type: 'object', properties: { propertyId: { type: 'string', description: 'ID of the property to get values for' }, query: { type: 'string', description: 'Optional search query for filtering values' }, orderBy: { type: 'string', enum: ['asc', 'desc'], description: 'Ordering for value results' }, limit: { type: 'number', description: 'Max number of values to return' }, skip: { type: 'number', description: 'Number of values to skip' } }, required: ['propertyId'] } },
- index.ts:410-425 (registration)The dispatch case in the MCP CallToolRequest handler that invokes the PropertyValues function with arguments and formats the response as MCP content.case 'PropertyValues': const propertyValues = await PropertyValues({ propertyId: args.propertyId as string, query: args.query as string | undefined, orderBy: args.orderBy as 'asc' | 'desc' | undefined, limit: args.limit as number | undefined, skip: args.skip as number | undefined }) return { content: [ { type: 'text', text: propertyValues ? JSON.stringify(propertyValues, null, 2) : 'No property values found' } ] }
- index.ts:44-44 (registration)Import statement that brings the PropertyValues handler into the main index.ts for use in the tool dispatcher.import { PropertyValues } from './tools/PropertyValues.js'