FindPropertyById
Retrieve specific property details using its unique identifier to access comprehensive property information in the database.
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 core handler function that executes the tool logic: finds a property by its ID using the database query db.properties.findById and returns 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)Input schema definition for the FindPropertyById tool, specifying the required propertyId string parameter.{ 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)Registration in the MCP server tool call dispatcher (switch case) that invokes the FindPropertyById handler and formats 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' } ] }
- index.ts:72-76 (registration)General registration of all tools (including FindPropertyById via imported tools array from tools.ts) for the ListTools MCP request.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools } })
- index.ts:46-46 (registration)Import of the FindPropertyById handler function into the main index.ts for use in the tool dispatcher.import { FindPropertyById } from './tools/FindPropertyById.js'