Skip to main content
Glama
ismaeldosil

FinaShopping MCP Server

by ismaeldosil

get-loan-requirements

Retrieve application requirements for specific loans to prepare documentation needed for submission.

Instructions

Get the requirements to apply for a specific loan. | Obtener los requisitos para solicitar un préstamo específico.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
loanIdYesLoan ID | ID del préstamo

Implementation Reference

  • Handler function that fetches loans, locates the specific loan by ID, determines additional requirements based on loan type (personal, auto, hipotecario), and returns a JSON-structured response with requirements, recommended income, and approval info.
    async ({ loanId }) => { const loans = await getLoans(); const loan = loans.find(l => l.id === loanId); if (!loan) { return { content: [{ type: 'text' as const, text: JSON.stringify({ error: 'Loan not found | Préstamo no encontrado', validIds: loans.map(l => ({ id: l.id, name: l.name })) }) }], isError: true }; } // Generate requirements based on loan type (bilingual) const baseRequirements = [ 'Valid Uruguayan ID card | Cédula de identidad uruguaya vigente', 'Proof of address | Comprobante de domicilio', 'Latest pay stub | Último recibo de sueldo' ]; const additionalRequirements: string[] = []; if (loan.name.toLowerCase().includes('hipotec')) { additionalRequirements.push( 'Property appraisal | Tasación del inmueble', 'Notarized property certificate | Certificado notarial de la propiedad', 'Last 3 bank statements | 3 últimos estados de cuenta bancarios', 'Minimum employment history: 2 years | Antigüedad laboral mínima: 2 años' ); } else if (loan.name.toLowerCase().includes('auto')) { additionalRequirements.push( 'Vehicle invoice or quote | Factura o cotización del vehículo', 'Mandatory insurance | Seguro obligatorio', 'Minimum employment history: 1 year | Antigüedad laboral mínima: 1 año' ); } else { additionalRequirements.push( 'Clean credit history | Clearing bancario limpio', 'Minimum employment history: 6 months | Antigüedad laboral mínima: 6 meses' ); } return { content: [{ type: 'text' as const, text: JSON.stringify({ loan: { id: loan.id, name: loan.name, institution: loan.institution }, requirements: { documentation: [...baseRequirements, ...additionalRequirements], income: `Recommended minimum income | Ingreso mínimo recomendado: ${Math.round(loan.monthlyPayment * 3).toLocaleString('es-UY')} $U monthly | mensuales`, approval: { probability: loan.probability, estimatedTime: loan.probability === 'alta' ? '24-48 hours | horas' : '3-5 business days | días hábiles' } }, features: loan.features }, null, 2) }] }; }
  • Input schema for the tool, requiring a numeric loanId parameter.
    { loanId: z.number().describe('Loan ID | ID del préstamo') },
  • Registration of the get-loan-requirements tool with the MCP server, including name and bilingual description.
    server.tool( 'get-loan-requirements', 'Get the requirements to apply for a specific loan. | Obtener los requisitos para solicitar un préstamo específico.',
  • Helper function to fetch all available loans from the API, used by the get-loan-requirements handler.
    async function getLoans(): Promise<Loan[]> { const response = await fetchLoans(); return response.loans; }

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/ismaeldosil/finashopping-mcp'

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