PropertyValues
Retrieve and filter property values from a graph database to support data-driven decisions and queries.
Instructions
Get values for a specific property
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| propertyId | Yes | ID of the property to get values for | |
| query | No | Optional search query for filtering values | |
| orderBy | No | Ordering for value results | |
| limit | No | Max number of values to return | |
| skip | No | Number of values to skip |
Implementation Reference
- tools/PropertyValues.ts:17-35 (handler)The core handler function that executes the PropertyValues tool logic by querying the database for values associated with a specific property ID, supporting optional filters.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:374-384 (schema)Input schema defining the parameters for the PropertyValues tool, including required propertyId and optional query, ordering, pagination.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)Registration of the PropertyValues tool in the tools array, including name, description, and schema; used by index.ts for MCP listTools.{ 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:44-44 (registration)Import of the PropertyValues handler function into the main index.ts for use in tool dispatching.import { PropertyValues } from './tools/PropertyValues.js'
- index.ts:410-425 (registration)Dispatch case in the MCP CallToolRequest handler that invokes the PropertyValues function and formats the response.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' } ] }