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;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is for 'automated property value estimates' but doesn't explain how the estimates are generated, whether they're real-time or cached, what data sources are used, or any rate limits or authentication requirements. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of property valuation with 8 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the output contains (e.g., estimated value range, confidence scores, comparable properties details), leaving the agent with incomplete context for proper tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with all 8 parameters well-documented in the schema itself. The description adds no additional parameter semantics beyond implying that inputs relate to 'property value estimates', so it meets the baseline of 3 without compensating for any schema gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get automated property value estimates') and the resource ('with comparable properties'), making the purpose understandable. However, it doesn't explicitly differentiate this tool from sibling tools like 'get_rent_estimates' or 'analyze_market', which might also provide property-related estimates.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_rent_estimates' or 'get_property_details'. It mentions 'comparable properties' but doesn't clarify if this is for sales, rentals, or general valuation, leaving usage context implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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