Skip to main content
Glama
tandat8503

Rentcast MCP Server

by tandat8503

get_rent_estimates

Estimate monthly rental prices for properties using location details, property characteristics, and market data to determine fair market rent values.

Instructions

Get long-term rent estimates with comparable rental properties. This tool helps you estimate monthly rental prices for properties based on location, property characteristics, and market data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressNoFull property address (e.g., '1011 W 23rd St, Apt 101, Austin, TX 78705')
bathroomsNoNumber of bathrooms (e.g., 1, 1.5, 2)
bedroomsNoNumber of bedrooms (e.g., 1, 2, 3)
latitudeNoProperty latitude coordinate (e.g., 30.287007)
longitudeNoProperty longitude coordinate (e.g., -97.748941)
propertyIdNoUnique property identifier from Rentcast database (e.g., '12345')
propertyTypeNoType of property (e.g., 'Apartment', 'House', 'Condo', 'Townhouse')
squareFootageNoProperty size in square feet (e.g., 450, 1200, 2000)

Implementation Reference

  • Primary MCP server tool registration and handler for 'get_rent_estimates'. Validates input parameters using RentEstimateSchema, builds API request params, calls rentcastAPI.getRentEstimates(), processes the response data including comparables, formats a comprehensive user-friendly output with estimates, ranges, and suggestions.
    server.tool(
      "get_rent_estimates",
      "Get long-term rent estimates with comparable rental properties. This tool helps you estimate monthly rental prices for properties based on location, property characteristics, and market data.",
      RentEstimateSchema.shape,
      async (params: z.infer<typeof RentEstimateSchema>) => {
        try {
          // Validate parameters using Zod schema
          const validatedParams = RentEstimateSchema.parse(params);
          
          // Build search parameters for rent estimates
          const searchParams: Record<string, any> = {};
          
          if (validatedParams.propertyId) searchParams.propertyId = validatedParams.propertyId;
          if (validatedParams.address) searchParams.address = validatedParams.address;
          if (validatedParams.latitude) searchParams.latitude = validatedParams.latitude;
          if (validatedParams.longitude) searchParams.longitude = validatedParams.longitude;
          if (validatedParams.propertyType) searchParams.propertyType = validatedParams.propertyType;
          if (validatedParams.bedrooms) searchParams.bedrooms = validatedParams.bedrooms;
          if (validatedParams.bathrooms) searchParams.bathrooms = validatedParams.bathrooms;
          if (validatedParams.squareFootage) searchParams.squareFootage = validatedParams.squareFootage;
    
          // Additional validation to ensure we have required parameters
          if (!searchParams.propertyId && !searchParams.address && (!searchParams.latitude || !searchParams.longitude)) {
            return createErrorResponse(
              "āŒ **Missing Required Parameters for Rent Estimates**\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\n\n" +
              "šŸ“‹ **Example Usage:**\n" +
              "```json\n" +
              "{\n" +
              '  "address": "1011 W 23rd St, Apt 101, Austin, TX 78705",\n' +
              '  "propertyType": "Apartment",\n' +
              '  "bedrooms": 1,\n' +
              '  "bathrooms": 1,\n' +
              '  "squareFootage": 450\n' +
              "}\n" +
              "```"
            );
          }
    
          const result = await rentcastAPI.getRentEstimates(searchParams);
    
          if (!result.success) {
            return createErrorResponse("Error getting rent estimates", result.error);
          }
    
          const rentData = result.data as RentEstimateResponse;
          if (!rentData) {
            return createErrorResponse("No rent estimate data found");
          }
          
    
    
          // Format the response
          let resultText = `šŸ  **Rent Estimate Results**\n\n`;
          
          // Add usage tips
          resultText += `šŸ’” **Tool Usage Tips:**\n`;
          resultText += `• Use this tool to estimate monthly rental prices for properties\n`;
          resultText += `• Provide more details (bedrooms, bathrooms, square footage) for better accuracy\n`;
          resultText += `• Results include comparable properties for market analysis\n\n`;
          
          // Property identification
          if (rentData.address) {
            resultText += `šŸ“ **Property:** ${rentData.address}\n`;
          }
          if (rentData.propertyType) {
            resultText += `šŸ  **Type:** ${rentData.propertyType}\n`;
          }
          if (rentData.bedrooms !== undefined) {
            resultText += `šŸ›ļø **Bedrooms:** ${rentData.bedrooms}\n`;
          }
          if (rentData.bathrooms !== undefined) {
            resultText += `🚿 **Bathrooms:** ${rentData.bathrooms}\n`;
          }
          if (rentData.squareFootage) {
            resultText += `šŸ“ **Square Footage:** ${rentData.squareFootage.toLocaleString()} sqft\n`;
          }
          
          resultText += `\nšŸ’° **Estimated Monthly Rent:** `;
          if (rentData.rent) {
            resultText += `$${Number(rentData.rent).toLocaleString()}/month`;
            
            // Add rent range if available
            if (rentData.rentRangeLow && rentData.rentRangeHigh) {
              resultText += `\nšŸ“Š **Rent Range:** $${Number(rentData.rentRangeLow).toLocaleString()} - $${Number(rentData.rentRangeHigh).toLocaleString()}/month`;
            }
          } else {
            resultText += `N/A`;
          }
          
          // Add comparables if available
          if (rentData.comparables && rentData.comparables.length > 0) {
            resultText += `\n\nšŸ˜ļø **Comparable Properties:**\n`;
            rentData.comparables.slice(0, 5).forEach((comp, index) => {
              resultText += `\n${index + 1}. **${comp.address}**\n`;
              resultText += `   šŸ’° Rent: $${Number(comp.rent).toLocaleString()}/month`;
              if (comp.bedrooms !== undefined) resultText += ` | šŸ›ļø ${comp.bedrooms} bed`;
              if (comp.bathrooms !== undefined) resultText += ` | 🚿 ${comp.bathrooms} bath`;
              if (comp.squareFootage) resultText += ` | šŸ“ ${comp.squareFootage.toLocaleString()} sqft`;
              if (comp.distance) resultText += ` | šŸ“ ${comp.distance.toFixed(1)} miles away`;
            });
          }
          
          // Add helpful footer
          resultText += `\n\nšŸ” **Need More Data?**\n`;
          resultText += `• Use \`get_property_details\` to get comprehensive property information\n`;
          resultText += `• Use \`get_rental_listings\` to see actual rental listings in the area\n`;
          resultText += `• Use \`analyze_market\` to understand rental market trends\n\n`;
    
          
          return createSuccessResponse(resultText);
    
        } catch (error) {
          if (error instanceof z.ZodError) {
            const errorDetails = error.errors.map(e => `${e.path.join('.')}: ${e.message}`).join(', ');
            return createErrorResponse(`Invalid parameters: ${errorDetails}`);
          }
          return createErrorResponse("Failed to get rent estimates", error instanceof Error ? error.message : 'Unknown error');
        }
      }
    );
  • Core service method implementing the Rentcast API call for long-term rent estimates. Makes authenticated GET request to '/avm/rent/long-term' endpoint with provided property parameters and returns ApiCallResult.
    async getRentEstimates(
      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/rent/long-term",
        params,
      );
      return result;
    }
  • Zod schema defining input parameters for the get_rent_estimates tool, including optional fields for property identification (propertyId, address, lat/lng) and characteristics (type, beds, baths, sqft) with descriptions.
    export const RentEstimateSchema = z.object({
      // Required parameters (at least one)
      propertyId: z.string().optional().describe("Unique property identifier from Rentcast database (e.g., '12345')"),
      address: z.string().optional().describe("Full property address (e.g., '1011 W 23rd St, Apt 101, Austin, TX 78705')"),
      latitude: z.number().optional().describe("Property latitude coordinate (e.g., 30.287007)"),
      longitude: z.number().optional().describe("Property longitude coordinate (e.g., -97.748941)"),
      
      // Optional parameters for better accuracy
      propertyType: z.string().optional().describe("Type of property (e.g., 'Apartment', 'House', 'Condo', 'Townhouse')"),
      bedrooms: z.number().optional().describe("Number of bedrooms (e.g., 1, 2, 3)"),
      bathrooms: z.number().optional().describe("Number of bathrooms (e.g., 1, 1.5, 2)"),
      squareFootage: z.number().optional().describe("Property size in square feet (e.g., 450, 1200, 2000)"),
    });
  • TypeScript interface defining the expected response structure from the rent estimate API call, including estimated rent, range, comparables array, and echoed input parameters.
    export interface RentEstimateResponse {
      rent?: number;
      rentRangeLow?: number;
      rentRangeHigh?: number;
      comparables?: Array<{
        address: string;
        rent: number;
        bedrooms?: number;
        bathrooms?: number;
        squareFootage?: number;
        propertyType?: string;
        distance?: number;
      }>;
      propertyId?: string;
      address?: string;
      latitude?: number;
      longitude?: number;
      propertyType?: string;
      bedrooms?: number;
      bathrooms?: number;
      squareFootage?: number;
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool 'helps you estimate' but doesn't disclose behavioral traits like whether it's a read-only operation, requires authentication, has rate limits, returns confidence intervals, or how 'comparable rental properties' are selected. The description is functional but lacks operational context needed for an agent to use it effectively.

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

Conciseness4/5

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

The description is appropriately concise with two sentences that directly state the tool's purpose and utility. It's front-loaded with the core function and avoids unnecessary elaboration. However, the second sentence could be slightly more precise about what 'helps you estimate' entails.

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 (8 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain what the output looks like (e.g., estimated rent range, comparables list), behavioral constraints, or how parameters interact (e.g., whether address or latitude/longitude is prioritized). For a tool with rich input schema but no other structured context, the description should provide more operational guidance.

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?

Schema description coverage is 100%, so the schema already documents all 8 parameters thoroughly. The description adds minimal value beyond the schema by mentioning 'location, property characteristics, and market data' which loosely corresponds to parameters like address/latitude/longitude, bedrooms/bathrooms/squareFootage/propertyType, but doesn't provide additional semantics, constraints, or usage guidance. Baseline 3 is appropriate when schema does the heavy lifting.

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 tool's purpose: 'Get long-term rent estimates with comparable rental properties' and 'estimate monthly rental prices for properties'. It specifies the action (get/estimate), resource (rent estimates), and scope (long-term, with comparables). However, it doesn't explicitly differentiate from sibling tools like 'get_property_value' or 'get_rental_listings', which likely provide different types of property data.

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. It mentions 'helps you estimate monthly rental prices' but doesn't specify scenarios where this is preferred over sibling tools like 'get_property_value' (which might estimate sale value) or 'get_rental_listings' (which might show actual listings). No exclusions or prerequisites are mentioned.

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