get_property_details
Retrieve comprehensive property information using a property ID to support accurate valuation and market analysis.
Instructions
Get detailed property information and prepare parameters for property value estimation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Property or listing ID for detailed information |
Implementation Reference
- src/index.ts:696-730 (handler)Main handler function for get_property_details tool. Fetches property details by ID, formats the information, and prepares parameters for related valuation and rent estimation tools.async (params) => { try { // This tool helps prepare property data for other tools const result = await rentcastAPI.getProperty(params.id); if (!result.success) { return createErrorResponse("Error getting property details", result.error); } const property = result.data as any; if (!property) { return createErrorResponse("No property details found"); } // Format property details const propertyInfo = formatPropertyInfo(property); // Prepare parameters for property value estimation const valueEstimationParams = createPropertyValueParams(property); const rentEstimationParams = createRentEstimationParams(property); const additionalInfo = `\n\n💡 **Copy these values to the get_property_value tool to get an automated valuation estimate!**\n\n` + `🏠 **Rent Estimation Parameters:**\n` + `${extractPropertyParams(property)}\n\n` + `💡 **Copy these values to the get_rent_estimates tool to get rent estimates!**`; const resultText = propertyInfo + valueEstimationParams + additionalInfo; return createSuccessResponse(resultText); } catch (error) { return createErrorResponse("Failed to get property details", error instanceof Error ? error.message : 'Unknown error'); } }
- src/types/index.ts:277-279 (schema)Zod schema defining the input parameters for the get_property_details tool, requiring a property ID.export const PropertyDetailSchema = z.object({ id: z.string().describe("Property or listing ID for detailed information"), });
- src/index.ts:692-731 (registration)MCP server tool registration for get_property_details, including name, description, input schema, and handler function.server.tool( "get_property_details", "Get detailed property information and prepare parameters for property value estimation", PropertyDetailSchema.shape, async (params) => { try { // This tool helps prepare property data for other tools const result = await rentcastAPI.getProperty(params.id); if (!result.success) { return createErrorResponse("Error getting property details", result.error); } const property = result.data as any; if (!property) { return createErrorResponse("No property details found"); } // Format property details const propertyInfo = formatPropertyInfo(property); // Prepare parameters for property value estimation const valueEstimationParams = createPropertyValueParams(property); const rentEstimationParams = createRentEstimationParams(property); const additionalInfo = `\n\n💡 **Copy these values to the get_property_value tool to get an automated valuation estimate!**\n\n` + `🏠 **Rent Estimation Parameters:**\n` + `${extractPropertyParams(property)}\n\n` + `💡 **Copy these values to the get_rent_estimates tool to get rent estimates!**`; const resultText = propertyInfo + valueEstimationParams + additionalInfo; return createSuccessResponse(resultText); } catch (error) { return createErrorResponse("Failed to get property details", error instanceof Error ? error.message : 'Unknown error'); } } );
- src/services/rentcast-api.ts:253-258 (helper)Helper method in RentcastAPI service that calls the Rentcast /properties/{id} endpoint to retrieve detailed property information.async getProperty(id: string): Promise<ApiCallResult> { const result = await this.makeRequest<RentcastProperty>( `/properties/${id}`, ); return result; }