IA y agentes
Punto de entrada para clientes de IA
Si el cliente soporta API o MCP, use esas superficies antes de inferir desde HTML o texto libre.
Developer docs visibles para clientes con navegación limitada.
Superficies exactas
- GET /api/v1/status -> salud, capacidades y totales.
- GET /api/v1/projects -> portafolio público.
- GET /api/v1/properties -> inventario filtrable.
- POST /api/v1/quote/calculate -> cotización manual.
- POST /api/v1/quote/from-property -> cotización por propiedad.
- GET /mcp -> landing técnica; el transporte real usa POST.
Cotización rápida para clientes web
Si el agente no logra abrir /cotizador.md o
/docs/api.md, puede reproducir la lógica mínima con estas
reglas visibles.
discountAmount = price * (discountRate / 100)netAmount = max(0, price - discountAmount)financedAmount = max(0, netAmount - entryAmount)-
interestAmount = remainingBalance * (annualRate / 100 / 360) * periodDaysen la primera cuota -
interestAmount = remainingBalance * (annualRate / 100 / 12)en cuotas siguientes
Tasas anuales por defecto: 16.77% para Montesito y Torres
Zermatt;
24.89%
para Santa Bárbara y Valle del Toachi.
{"propertyId":"montesito:mz-a-lote-1","purchaseType":"Financiado"}
{"project":"Montesito","propertyLabel":"Mz A Lote 1","propertyType":"Lote","price":12990,"purchaseType":"Financiado","entryAmount":3897,"annualRate":16.77,"termMonths":36}
Tools MCP
list_projects, get_project,
list_properties, get_property,
calculate_quote
Tools WebMCP
En la implementación actual, /, /mapa y
/cotizador
pueden registrar
tv_list_properties, tv_get_property,
tv_calculate_quote
y tv_open_quote.
Flujo MCP mínimo
Tras GET /mcp, usa initialize, luego
tools/list
y finalmente tools/call.
POST /mcp
Accept: application/json, text/event-stream
Content-Type: application/json
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"example-client","version":"1.0.0"}}}
POST /mcp
Accept: application/json, text/event-stream
Content-Type: application/json
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}
POST /mcp
Accept: application/json, text/event-stream
Content-Type: application/json
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"calculate_quote","arguments":{"propertyId":"montesito:mz-a-lote-1","purchaseType":"Financiado"}}}
Ejemplos
curl https://www.terravivet.com/api/v1/status
curl 'https://www.terravivet.com/api/v1/properties?project=montesito&availableOnly=true&limit=5'
curl -X POST https://www.terravivet.com/api/v1/quote/from-property \
-H 'content-type: application/json' \
-d '{"propertyId":"montesito:mz-a-lote-1","purchaseType":"Financiado"}'