- Built from scratch: apollo, chargebee, datadog, greenhouse, lever, loom, pandadoc, salesloft, sendgrid, supabase, typeform, webflow, zoho-crm, twilio, reonomy - TSC fixes: brevo, google-console, housecall-pro, meta-ads, rippling, bamboohr, close, fieldedge, freshdesk, helpscout, toast, touchbistro, hubspot, notion, quickbooks, airtable, gusto, intercom, linear, monday, salesforce, shopify, square, wave, xero - Entry points added: close, touchbistro - All 65 active servers compile with 0 TypeScript errors - 4 specialty servers skipped (competitor-research, compliance-grc, n8n-apps, product-analytics)
101 lines
4.1 KiB
TypeScript
101 lines
4.1 KiB
TypeScript
/**
|
|
* Tenant-related MCP tools
|
|
*/
|
|
|
|
import { z } from 'zod';
|
|
import { ReonomyClient } from '../client/reonomy-client.js';
|
|
|
|
const ListPropertyTenantsSchema = z.object({
|
|
propertyId: z.string().describe('Unique Reonomy property ID'),
|
|
page: z.number().optional().describe('Page number for pagination (default: 1)'),
|
|
limit: z.number().optional().describe('Number of results per page (default: 25, max: 100)'),
|
|
offset: z.number().optional().describe('Offset for results (alternative to page)'),
|
|
});
|
|
|
|
const GetTenantSchema = z.object({
|
|
tenantId: z.string().describe('Unique Reonomy tenant ID'),
|
|
});
|
|
|
|
const SearchTenantsSchema = z.object({
|
|
name: z.string().optional().describe('Tenant name or partial name to search'),
|
|
tenantType: z.string().optional().describe('Type of tenant: retail, office, industrial, residential, other'),
|
|
industry: z.string().optional().describe('Industry or business sector of tenant'),
|
|
activeLeases: z.boolean().optional().describe('Filter for tenants with currently active leases'),
|
|
page: z.number().optional().describe('Page number for pagination (default: 1)'),
|
|
limit: z.number().optional().describe('Number of results per page (default: 25, max: 100)'),
|
|
offset: z.number().optional().describe('Offset for results (alternative to page)'),
|
|
});
|
|
|
|
export const tenantTools = [
|
|
{
|
|
name: 'list_property_tenants',
|
|
description: `List all tenants occupying a specific commercial property. Use this tool when you need to:
|
|
- Identify current tenants in a building or property
|
|
- Review tenant mix for retail centers or office buildings
|
|
- Analyze occupancy and lease details
|
|
- Understand property income streams from rent
|
|
- Assess tenant quality and lease terms for investment analysis
|
|
Returns paginated list of tenants with lease information including start/end dates, monthly rent, and square footage occupied.`,
|
|
inputSchema: ListPropertyTenantsSchema,
|
|
handler: async (client: ReonomyClient, args: z.infer<typeof ListPropertyTenantsSchema>) => {
|
|
const { propertyId, ...paginationParams } = args;
|
|
const result = await client.listPropertyTenants(propertyId, paginationParams);
|
|
return {
|
|
content: [
|
|
{
|
|
type: 'text',
|
|
text: JSON.stringify(result, null, 2),
|
|
},
|
|
],
|
|
};
|
|
},
|
|
},
|
|
{
|
|
name: 'get_tenant',
|
|
description: `Retrieve detailed information about a specific tenant. Use this tool when you need:
|
|
- Complete tenant profile including name, type, and industry
|
|
- Contact information (email and phone)
|
|
- Lease terms: start date, end date, duration in months
|
|
- Financial details: monthly rent and square footage
|
|
- Location within property (floor number, suite number)
|
|
- Tenant classification (retail, office, industrial, residential)
|
|
Useful for tenant credit analysis, lease renewal planning, or understanding tenant operations and space utilization.`,
|
|
inputSchema: GetTenantSchema,
|
|
handler: async (client: ReonomyClient, args: z.infer<typeof GetTenantSchema>) => {
|
|
const result = await client.getTenant(args.tenantId);
|
|
return {
|
|
content: [
|
|
{
|
|
type: 'text',
|
|
text: JSON.stringify(result, null, 2),
|
|
},
|
|
],
|
|
};
|
|
},
|
|
},
|
|
{
|
|
name: 'search_tenants',
|
|
description: `Search for tenants across the Reonomy database. Use this tool when you need to:
|
|
- Find tenants by business name across multiple properties
|
|
- Identify tenants in specific industries or sectors
|
|
- Research tenant expansion patterns and location preferences
|
|
- Filter for tenants with active leases vs. expired leases
|
|
- Analyze tenant types (retail, office, industrial, residential)
|
|
- Build marketing lists for property leasing opportunities
|
|
- Track major retailers or corporate tenants across markets
|
|
Returns paginated list of tenants matching search criteria with current lease status.`,
|
|
inputSchema: SearchTenantsSchema,
|
|
handler: async (client: ReonomyClient, args: z.infer<typeof SearchTenantsSchema>) => {
|
|
const result = await client.searchTenants(args);
|
|
return {
|
|
content: [
|
|
{
|
|
type: 'text',
|
|
text: JSON.stringify(result, null, 2),
|
|
},
|
|
],
|
|
};
|
|
},
|
|
},
|
|
];
|