Skip to main content
Glama

opzet_hypotheek_uitgebreid

Calculate comprehensive mortgage scenarios with full parameter control for custom loan definitions, interest rates, terms, and energy efficiency considerations.

Instructions

GEAVANCEERDE opzet hypotheek berekening met VOLLEDIGE controle over alle parameters. Geschikt voor zowel starters als doorstromers.

Output bevat alles van de starter/doorstromer tools, plus:

  • Mogelijkheid om elk leningdeel handmatig te definiëren

  • Custom rentepercentages, looptijden en rentevast periodes

  • NHG, energielabel en verbouwing/duurzaamheidsbudget in één scenario

  • Volledige balans check en praktische toelichtingen

Gebruik deze tool alleen wanneer afwijkende parameters nodig zijn; anders de specifieke starter/doorstromer varianten gebruiken.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inkomen_aanvragerYesBruto jaarinkomen van de hoofdaanvrager in euro's
geboortedatum_aanvragerYesGeboortedatum aanvrager in formaat YYYY-MM-DD
heeft_partnerYesHeeft de aanvrager een partner die mee aanvraagt?
inkomen_partnerNoOPTIONEEL - Bruto jaarinkomen van de partner in euro's.
geboortedatum_partnerNoOPTIONEEL - Geboortedatum partner in formaat YYYY-MM-DD.
verplichtingen_pmNoMaandelijkse verplichtingen in euro's.
eigen_vermogenNoEigen geld beschikbaar in euro's.
is_doorstromerNoIs dit een doorstromer met bestaande woning en hypotheek?
waarde_huidige_woningNoOPTIONEEL - Alleen voor doorstromers: huidige woningwaarde in euro's
bestaande_hypotheekNoOPTIONEEL - Alleen voor doorstromers: gegevens van de bestaande hypotheek.
nieuwe_woningYesGegevens van de nieuwe woning die gekocht wordt
nieuwe_leningNoOPTIONEEL - Specifieke parameters voor de nieuwe lening. Gebruik deze sectie om looptijd, rentevast periode, NHG of renteklassen aan te passen.
session_idNoOPTIONEEL - Sessie ID voor het traceren van de conversatie. Haal deze waarde uit de n8n chat trigger: 'When chat message received' -> sessionId variabele.

Implementation Reference

  • Main handler function for the 'opzet_hypotheek_uitgebreid' tool. Validates and normalizes input arguments, constructs the payload for the external Replit API (REPLIT_API_URL_OPZET), performs the API call, and formats the response using formatResponse.
    async function handleOpzetUitgebreid(request: any): Promise<ToolResponse> {
      const rawArgs = requireArguments<OpzetUitgebreidArguments>(request);
      const normalizedArgs = rawArgs.is_doorstromer
        ? (normalizeOpzetDoorstromerArgs(rawArgs) as OpzetUitgebreidArguments)
        : (normalizeOpzetAanvragerShape(rawArgs) as OpzetUitgebreidArguments);
      const logger = createLogger(normalizedArgs.session_id);
    
      const aanvrager = requireOpzetAanvrager(normalizedArgs);
      validateOpzetAanvrager(aanvrager);
      if (normalizedArgs.is_doorstromer && normalizedArgs.bestaande_hypotheek) {
        validateBestaandeHypotheek(normalizedArgs.bestaande_hypotheek);
      }
      enforceRateLimit(normalizedArgs.session_id);
    
      const payload: any = {
        aanvrager: mapOpzetAanvrager(aanvrager),
        nieuwe_woning: {
          waarde_woning: normalizedArgs.nieuwe_woning.waarde_woning,
          bedrag_verbouwen: normalizedArgs.nieuwe_woning.bedrag_verbouwen ?? 0,
          bedrag_verduurzamen: normalizedArgs.nieuwe_woning.bedrag_verduurzamen ?? 0,
          kosten_percentage: normalizedArgs.nieuwe_woning.kosten_percentage ?? 0.05,
          energielabel: normalizeEnergielabel(normalizedArgs.nieuwe_woning.energielabel || ''),
        },
      };
    
      if (normalizedArgs.is_doorstromer && normalizedArgs.waarde_huidige_woning && normalizedArgs.bestaande_hypotheek) {
        payload.bestaande_hypotheek = {
          waarde_huidige_woning: normalizedArgs.waarde_huidige_woning,
          leningdelen: normalizedArgs.bestaande_hypotheek.leningdelen,
        };
      }
    
      const maatwerk = (normalizedArgs as any).nieuwe_hypotheek ?? (normalizedArgs as any).nieuwe_lening;
      const nieuweLening = buildNieuweLeningPayload(maatwerk);
      if (nieuweLening) {
        payload.nieuwe_lening = nieuweLening;
      }
    
      if (normalizedArgs.session_id) {
        payload.session_id = normalizedArgs.session_id;
      }
    
      const apiClient = getApiClient();
      const { data } = await apiClient.post(
        REPLIT_API_URL_OPZET,
        payload,
        { correlationId: normalizedArgs.session_id }
      );
    
      logger.info('Toolcall succesvol', { tool: 'opzet_hypotheek_uitgebreid' });
      return successResponse(formatResponse(data, "opzet_hypotheek_uitgebreid"));
    }
  • src/index.ts:766-774 (registration)
    Registration of the tool handler in the TOOL_HANDLERS object, which maps the tool name 'opzet_hypotheek_uitgebreid' to its handler function. This map is used by the CallToolRequestSchema handler to dispatch requests.
    const TOOL_HANDLERS: Record<string, ToolHandler> = {
      bereken_hypotheek_starter: handleBerekenStarter,
      bereken_hypotheek_doorstromer: handleBerekenDoorstromer,
      bereken_hypotheek_uitgebreid: handleBerekenUitgebreid,
      haal_actuele_rentes_op: handleActueleRentes,
      opzet_hypotheek_starter: handleOpzetStarter,
      opzet_hypotheek_doorstromer: handleOpzetDoorstromer,
      opzet_hypotheek_uitgebreid: handleOpzetUitgebreid,
    };
  • Input schema and metadata definition for the tool, provided in the ListTools response. Includes detailed properties, descriptions, enums, and required fields for validation and documentation.
          {
            name: "opzet_hypotheek_uitgebreid",
            description: `GEAVANCEERDE opzet hypotheek berekening met VOLLEDIGE controle over alle parameters. Gebruik deze variant alleen wanneer er een concrete woning is én de gebruiker/adviseur expliciet scenario’s wil tweaken (andere rentes, looptijden, specifieke nieuwe leningdelen). Voor snelle beantwoording zonder maatwerk blijft u bij opzet_hypotheek_starter of opzet_hypotheek_doorstromer.
      
      **Output bevat alles van de starter/doorstromer tools, plus:**
      - Mogelijkheid om elk leningdeel handmatig te definiëren
      - Custom rentepercentages, looptijden en rentevast periodes
      - NHG, energielabel en verbouwing/duurzaamheidsbudget in één scenario
      - Volledige balans check en praktische toelichtingen
      
      Gebruik deze tool alleen wanneer afwijkende parameters nodig zijn; anders de specifieke starter/doorstromer varianten gebruiken.
    
    **Doorstromer invoerbeleid:**
    - Vraag óók hier: "Wilt u een snelle globale berekening (met een samenvatting van uw hypotheek) of een detailberekening waarbij u alle leningdelen invoert?"
    - Snelle route → één samenvattend leningdeel (totale schuld, gemiddelde rente/looptijd, optionele maandlast).
    - Detailroute → volledige lijst leningdelen met de exacte waarden per deel. Kopieer deze rechtstreeks in de leningdelen array.`,
            inputSchema: {
              type: "object",
              properties: {
                aanvrager: aanvragerSchema,
                is_doorstromer: {
                  type: "boolean",
                  description: "Is dit een doorstromer met bestaande woning en hypotheek?",
                },
                waarde_huidige_woning: {
                  type: "number",
                  description: "OPTIONEEL - Alleen voor doorstromers: huidige woningwaarde in euro's",
                },
                bestaande_hypotheek: {
                  type: "object",
                  description: "OPTIONEEL - Alleen voor doorstromers: gegevens van de bestaande hypotheek.",
                  properties: {
                    leningdelen: {
                      type: "array",
                      items: {
                        type: "object",
                        properties: {
                          huidige_schuld: {
                            type: "number",
                            description: "Restschuld in euro's",
                          },
                          huidige_rente: {
                            type: "number",
                            description: "Rente als decimaal (bijv. 0.041 voor 4.1%)",
                          },
                          resterende_looptijd_in_maanden: {
                            type: "number",
                            description: "Resterende looptijd in MAANDEN",
                          },
                          rentevasteperiode_maanden: {
                            type: "number",
                            description: "Resterende rentevaste periode in MAANDEN",
                          },
                          hypotheekvorm: {
                            type: "string",
                            description: "Type hypotheek",
                            enum: ["annuiteit", "lineair", "aflossingsvrij"],
                          },
                        },
                        required: ["huidige_schuld", "huidige_rente", "resterende_looptijd_in_maanden", "rentevasteperiode_maanden", "hypotheekvorm"],
                      },
                    },
                  },
                  required: ["leningdelen"],
                },
                nieuwe_woning: {
                  type: "object",
                  description: "Gegevens van de nieuwe woning die gekocht wordt",
                  properties: {
                    waarde_woning: {
                      type: "number",
                      description: "Koopsom van de nieuwe woning in euro's",
                    },
                    bedrag_verbouwen: {
                      type: "number",
                      description: "OPTIONEEL - Geschatte kosten voor verbouwing/meerwerk in euro's.",
                      default: 0,
                    },
                    bedrag_verduurzamen: {
                      type: "number",
                      description: "OPTIONEEL - Geschatte kosten voor verduurzaming in euro's.",
                      default: 0,
                    },
                    kosten_percentage: {
                      type: "number",
                      description: "OPTIONEEL - Koperkosten als decimaal (bijv. 0.05 voor 5%). Standaard: 0.05",
                      default: 0.05,
                    },
                    energielabel: {
                      type: "string",
                      description: "OPTIONEEL - Energielabel van de nieuwe woning.",
                      enum: ["A++++ (met garantie)", "A++++", "A+++", "A++", "A+", "A", "B", "C", "D", "E", "F", "G"],
                    },
                  },
                  required: ["waarde_woning"],
                },
                nieuwe_lening: {
                  type: "object",
                  description: "OPTIONEEL - Specifieke parameters voor de nieuwe lening. Gebruik deze sectie om looptijd, rentevast periode, NHG of renteklassen aan te passen.",
                  properties: {
                    looptijd_jaren: {
                      type: "number",
                      description: "Looptijd van de hypotheek in JAREN. Standaard: 30 jaar. Voorbeelden: 20, 25, 30",
                      default: 30,
                    },
                    rentevast_periode_jaren: {
                      type: "number",
                      description: "Rentevaste periode in JAREN. Standaard: 10 jaar. Voorbeelden: 5, 10, 15, 20",
                      default: 10,
                    },
                    nhg: {
                      type: "boolean",
                      description: "Nationale Hypotheek Garantie aanvragen? Standaard: false",
                      default: false,
                    },
                    renteklassen: {
                      type: "array",
                      description: "OPTIONEEL - Custom renteklassen met specifieke LTV-grenzen en rentepercentages. Alleen invullen als je specifieke renteklassen wilt definiëren.",
                      items: {
                        type: "object",
                        properties: {
                          naam: {
                            type: "string",
                            description: "Naam van de renteklasse (bijv. 'NHG 0-200', 'Niet-NHG 75-90')",
                          },
                          lowerbound_ltv_pct: {
                            type: "number",
                            description: "Ondergrens LTV in procenten (bijv. 0.0, 75.0)",
                          },
                          higherbound_ltv_pct: {
                            type: "number",
                            description: "Bovengrens LTV in procenten (bijv. 75.0, 200.0)",
                          },
                          nhg: {
                            type: "boolean",
                            description: "Is dit een NHG renteklasse?",
                          },
                          rente_jaarlijks_pct: {
                            type: "number",
                            description: "Rentepercentage als getal (bijv. 3.2 voor 3.2%, 4.0 voor 4.0%)",
                          },
                        },
                        required: ["naam", "lowerbound_ltv_pct", "higherbound_ltv_pct", "nhg", "rente_jaarlijks_pct"],
                      },
                    },
                  },
                },
                session_id: {
                  type: "string",
                  description: "OPTIONEEL - Sessie ID voor het traceren van de conversatie. Haal deze waarde uit de n8n chat trigger: 'When chat message received' -> sessionId variabele.",
                },
              },
              required: [
                "aanvrager",
                "nieuwe_woning",
              ],
            },
          },
  • Helper function used in the handler to construct the 'nieuwe_lening' payload from optional maatwerk parameters like looptijd_jaren, rentevast_periode_jaren, nhg, and renteklassen.
    function buildNieuweLeningPayload(raw: any): any | undefined {
      if (!raw || typeof raw !== 'object') {
        return undefined;
      }
    
      const payload: Record<string, unknown> = {};
    
      const looptijdMaanden =
        raw.looptijd_maanden ??
        (typeof raw.looptijd_jaren === 'number' ? raw.looptijd_jaren * 12 : undefined);
      if (looptijdMaanden) {
        payload.looptijd_maanden = looptijdMaanden;
      }
    
      const rentevastMaanden =
        raw.rentevaste_periode_maanden ??
        (typeof raw.rentevast_periode_jaren === 'number' ? raw.rentevast_periode_jaren * 12 : undefined);
      if (rentevastMaanden) {
        payload.rentevaste_periode_maanden = rentevastMaanden;
      }
    
      if (raw.rente !== undefined) {
        payload.rente = raw.rente;
      }
    
      if (raw.hypotheekvorm) {
        payload.hypotheekvorm = raw.hypotheekvorm;
      } else if (raw.type) {
        payload.hypotheekvorm = raw.type;
      }
    
      if (raw.energielabel) {
        payload.energielabel = normalizeEnergielabel(raw.energielabel);
      }
    
      if (raw.nhg !== undefined) {
        payload.nhg = raw.nhg;
      }
    
      if (raw.ltv !== undefined) {
        let ltvValue: number | undefined;
        if (typeof raw.ltv === 'string') {
          const parsed = parseFloat(raw.ltv.replace('%', ''));
          ltvValue = Number.isFinite(parsed) ? parsed / 100 : undefined;
        } else if (typeof raw.ltv === 'number') {
          ltvValue = raw.ltv;
        }
        if (ltvValue !== undefined) {
          payload.ltv = ltvValue;
        }
      }
    
      if (Array.isArray(raw.renteklassen) && raw.renteklassen.length > 0) {
        payload.renteklassen = raw.renteklassen;
      }
    
      return Object.keys(payload).length > 0 ? payload : undefined;
    }
  • TypeScript interface defining the expected arguments structure for the tool handler.
    interface OpzetUitgebreidArguments extends OpzetBaseArguments {
      nieuwe_woning: NieuweWoning;
      is_doorstromer?: boolean;
      waarde_huidige_woning?: number;
      bestaande_hypotheek?: BestaandeHypotheek;
      nieuwe_lening?: OpzetNieuweLening;
    }
Behavior3/5

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

With no annotations provided, the description carries full burden. It mentions the output includes 'full balance check and practical explanations' and lists specific output components, but doesn't disclose behavioral aspects like whether this is a calculation-only tool (no side effects), error handling, performance characteristics, or authentication requirements.

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 efficiently structured with a clear opening statement, bulleted output features, and explicit usage guidelines. Every sentence adds value with no redundancy. The bold formatting for 'Output contains everything...' effectively highlights key information.

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

Completeness4/5

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

For a complex tool with 13 parameters, nested objects, no annotations, and no output schema, the description does well by explaining the advanced nature, output components, and when to use it. However, it could better address the tool's behavioral characteristics given the absence of annotations and output schema.

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

Parameters4/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 13 parameters thoroughly. The description adds value by explaining this is for 'advanced calculation with FULL control over all parameters' and mentions specific capabilities like manual loan part definition, custom interest rates, and NHG/energy label integration, which helps contextualize the complex parameter structure.

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

Purpose5/5

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

The description clearly states the tool performs an 'advanced mortgage calculation setup with FULL control over all parameters' and specifies it's suitable for both starters and movers. It distinguishes itself from siblings by mentioning it contains everything from the starter/mover tools plus additional capabilities like manual loan part definition and custom interest rates.

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

Usage Guidelines5/5

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

The description provides explicit guidance: 'Use this tool only when deviating parameters are needed; otherwise use the specific starter/mover variants.' This clearly states when to use this tool versus alternatives, with named sibling tools implied.

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/pace8/Test'

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