Skip to main content
Glama
tandat8503

Rentcast MCP Server

by tandat8503

get_property_value

Retrieve automated property value estimates with comparable properties using property details like address, bedrooms, and square footage.

Instructions

Get automated property value estimates with comparable properties

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressNoProperty address for valuation
bathroomsNoNumber of bathrooms
bedroomsNoNumber of bedrooms
latitudeNoProperty latitude coordinate
longitudeNoProperty longitude coordinate
propertyIdNoProperty ID for valuation
propertyTypeNoProperty type for valuation
squareFootageNoProperty square footage

Implementation Reference

  • src/index.ts:456-513 (registration)
    Registration of the 'get_property_value' MCP tool, including inline handler that validates params, calls Rentcast API via helper, formats AVM results with comparables, and returns formatted response.
    server.tool( "get_property_value", "Get automated property value estimates with comparable properties", AVMSchema.shape, async (params: z.infer<typeof AVMSchema>) => { try { const searchParams = buildAVMSearchParams(params); // Additional validation to ensure we have required parameters if (!searchParams.propertyId && !searchParams.address && (!searchParams.latitude || !searchParams.longitude)) { return createErrorResponse( "❌ **Missing Required Parameters for Property Valuation**\n\n" + "💡 **You must provide ONE of the following options:**\n\n" + "**Option 1: Property Address**\n" + "• `address`: Full property address (e.g., '1011 W 23rd St, Apt 101, Austin, TX 78705')\n\n" + "**Option 2: GPS Coordinates**\n" + "• `latitude`: Property latitude (e.g., 30.287007)\n" + "• `longitude`: Property longitude (e.g., -97.748941)\n\n" + "**Option 3: Property ID**\n" + "• `propertyId`: Unique identifier from Rentcast database\n\n" + "🔍 **Optional Parameters (improve accuracy):**\n" + "• `propertyType`: Apartment, House, Condo, etc.\n" + "• `bedrooms`: Number of bedrooms\n" + "• `bathrooms`: Number of bathrooms\n" + "• `squareFootage`: Property size in sq ft" ); } const result = await rentcastAPI.getPropertyValue(searchParams); if (!result.success) { return createErrorResponse("Error getting property value", result.error); } const avm = result.data as any; if (!avm) { return createErrorResponse("No property value data found"); } let resultText = `💰 Estimated Value: ${avm.price ? `$${Number(avm.price).toLocaleString()}` : 'N/A'}`; const range = avm.priceRangeLow && avm.priceRangeHigh ? ` (Range: $${Number(avm.priceRangeLow).toLocaleString()} - $${Number(avm.priceRangeHigh).toLocaleString()})` : ''; resultText += `${range}`; if (avm.comparables && avm.comparables.length > 0) { resultText += formatComparables(avm.comparables); } return createSuccessResponse(resultText); } catch (error) { return createErrorResponse("Failed to get property value", error instanceof Error ? error.message : 'Unknown error'); } } );
  • Inline handler function for get_property_value tool: parameter validation, API call, response formatting with estimated value, price range, and comparable properties.
    async (params: z.infer<typeof AVMSchema>) => { try { const searchParams = buildAVMSearchParams(params); // Additional validation to ensure we have required parameters if (!searchParams.propertyId && !searchParams.address && (!searchParams.latitude || !searchParams.longitude)) { return createErrorResponse( "❌ **Missing Required Parameters for Property Valuation**\n\n" + "💡 **You must provide ONE of the following options:**\n\n" + "**Option 1: Property Address**\n" + "• `address`: Full property address (e.g., '1011 W 23rd St, Apt 101, Austin, TX 78705')\n\n" + "**Option 2: GPS Coordinates**\n" + "• `latitude`: Property latitude (e.g., 30.287007)\n" + "• `longitude`: Property longitude (e.g., -97.748941)\n\n" + "**Option 3: Property ID**\n" + "• `propertyId`: Unique identifier from Rentcast database\n\n" + "🔍 **Optional Parameters (improve accuracy):**\n" + "• `propertyType`: Apartment, House, Condo, etc.\n" + "• `bedrooms`: Number of bedrooms\n" + "• `bathrooms`: Number of bathrooms\n" + "• `squareFootage`: Property size in sq ft" ); } const result = await rentcastAPI.getPropertyValue(searchParams); if (!result.success) { return createErrorResponse("Error getting property value", result.error); } const avm = result.data as any; if (!avm) { return createErrorResponse("No property value data found"); } let resultText = `💰 Estimated Value: ${avm.price ? `$${Number(avm.price).toLocaleString()}` : 'N/A'}`; const range = avm.priceRangeLow && avm.priceRangeHigh ? ` (Range: $${Number(avm.priceRangeLow).toLocaleString()} - $${Number(avm.priceRangeHigh).toLocaleString()})` : ''; resultText += `${range}`; if (avm.comparables && avm.comparables.length > 0) { resultText += formatComparables(avm.comparables); } return createSuccessResponse(resultText); } catch (error) { return createErrorResponse("Failed to get property value", error instanceof Error ? error.message : 'Unknown error'); } } );
  • Zod schema (AVMSchema) defining input parameters for the get_property_value tool, including optional propertyId, address, lat/lng, and property characteristics.
    export const AVMSchema = z.object({ propertyId: z.string().optional().describe("Property ID for valuation"), address: z.string().optional().describe("Property address for valuation"), latitude: z.number().optional().describe("Property latitude coordinate"), longitude: z.number().optional().describe("Property longitude coordinate"), propertyType: z.string().optional().describe("Property type for valuation"), bedrooms: z.number().min(0).max(10).optional().describe("Number of bedrooms"), bathrooms: z .number() .min(0) .max(10) .optional() .describe("Number of bathrooms"), squareFootage: z.number().optional().describe("Property square footage"), });
  • RentcastAPI helper method that makes the actual API request to '/avm/value' endpoint for property value estimation (AVM).
    async getPropertyValue( params: { propertyId?: string; address?: string; latitude?: number; longitude?: number; propertyType?: string; bedrooms?: number; bathrooms?: number; squareFootage?: number; } = {}, ): Promise<ApiCallResult> { const result = await this.makeRequest<RentcastAVM>("/avm/value", params); return result; }
  • buildAVMSearchParams helper: constructs search parameters for AVM calls, prioritizing address or coordinates or propertyId, and including optional characteristics.
    function buildAVMSearchParams(params: any): any { const searchParams: any = {}; // Prioritize address if provided, otherwise use other parameters if (params.address) { searchParams.address = params.address; } else if (params.latitude && params.longitude) { searchParams.latitude = params.latitude; searchParams.longitude = params.longitude; } else if (params.propertyId) { searchParams.propertyId = params.propertyId; } // Add additional parameters if available (these improve accuracy) if (params.propertyType) searchParams.propertyType = params.propertyType; if (params.bedrooms !== undefined && params.bedrooms !== null) searchParams.bedrooms = params.bedrooms; if (params.bathrooms !== undefined && params.bathrooms !== null) searchParams.bathrooms = params.bathrooms; if (params.squareFootage !== undefined && params.squareFootage !== null) searchParams.squareFootage = params.squareFootage; return searchParams; }

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/tandat8503/mcp_rentcast'

If you have feedback or need assistance with the MCP directory API, please join our Discord server