FindPropertyById
Retrieve property details using a unique ID from the RushDB graph database for efficient data access.
Instructions
Find a specific property by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| propertyId | Yes | ID of the property to retrieve |
Implementation Reference
- tools/FindPropertyById.ts:17-23 (handler)The main handler function that implements the core logic of the FindPropertyById tool by querying the database for a property using its ID and returning the data.export async function FindPropertyById(params: { propertyId: string }) { const { propertyId } = params const result = await db.properties.findById(propertyId) return result.data }
- tools.ts:404-412 (schema)Defines the tool's metadata including name, description, and input schema for validation and listing in MCP tool discovery.{ name: 'FindPropertyById', description: 'Find a specific property by ID', inputSchema: { type: 'object', properties: { propertyId: { type: 'string', description: 'ID of the property to retrieve' } }, required: ['propertyId'] } },
- index.ts:454-465 (registration)Registers the tool in the MCP server's CallToolRequest handler by dispatching calls to the FindPropertyById function and formatting the response.case 'FindPropertyById': const foundProperty = await FindPropertyById({ propertyId: args.propertyId as string }) return { content: [ { type: 'text', text: foundProperty ? JSON.stringify(foundProperty, null, 2) : 'Property not found' } ] }