Skip to main content
Glama

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
NameRequiredDescriptionDefault
propertyIdYesID of the property to retrieve

Implementation Reference

  • 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 }
  • 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'

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