Skip to main content
Glama

opzet_hypotheek_doorstromer

Calculate mortgage setup for home movers with existing property to determine required amount, financing components, and monthly payments comparison between current and new mortgage.

Instructions

Berekent de hypotheekopzet voor doorstromers met bestaande woning. Output: benodigd bedrag, financiering per component en maandlasten (bestaand versus nieuw).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inkomen_aanvragerYesBruto jaarinkomen hoofdaanvrager in euro's.
geboortedatum_aanvragerYesGeboortedatum hoofdaanvrager (YYYY-MM-DD).
heeft_partnerYesGeeft aan of een partner mee leent.
inkomen_partnerNoOptioneel partnerinkomen in euro's.
geboortedatum_partnerNoOptionele geboortedatum partner (YYYY-MM-DD).
verplichtingen_pmNoOptionele maandelijkse verplichtingen in euro's.
eigen_vermogenNoOptioneel beschikbaar eigen geld in euro's.
waarde_huidige_woningYesMarktwaarde van de huidige woning.
bestaande_hypotheekYesBestaande leningdelen voor doorstromer (detailuitleg: hypotheek://v4/guide/opzet-intake).
nieuwe_woningYesKerngegevens nieuwe woning (detailuitleg: hypotheek://v4/guide/opzet-intake).
session_idNoOptioneel sessie-ID vanuit n8n (voor logging).

Implementation Reference

  • Main handler function: normalizes arguments, validates input (aanvrager, bestaande_hypotheek), builds payload with aanvrager, bestaande_hypotheek, nieuwe_woning details, POSTs to backend API (REPLIT_API_URL_OPZET), logs success, and formats/returns response.
    async function handleOpzetDoorstromer(request: any): Promise<ToolResponse> {
      const rawArgs = requireArguments<OpzetDoorstromerArguments>(request);
      const normalizedArgs = normalizeOpzetDoorstromerArgs(rawArgs) as OpzetDoorstromerArguments;
      const logger = createLogger(normalizedArgs.session_id);
    
      const aanvrager = requireOpzetAanvrager(normalizedArgs);
      validateOpzetAanvrager(aanvrager);
      validateBestaandeHypotheek(normalizedArgs.bestaande_hypotheek);
      enforceRateLimit(normalizedArgs.session_id);
    
      const payload: any = {
        aanvrager: mapOpzetAanvrager(aanvrager),
        bestaande_hypotheek: {
          waarde_huidige_woning: normalizedArgs.waarde_huidige_woning,
          leningdelen: normalizedArgs.bestaande_hypotheek.leningdelen,
        },
        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.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_doorstromer' });
      return successResponse(formatResponse(data, "opzet_hypotheek_doorstromer"));
    }
  • src/index.ts:766-774 (registration)
    Registration of all tool handlers in TOOL_HANDLERS map, including opzet_hypotheek_doorstromer mapped to handleOpzetDoorstromer. Used by CallToolRequestSchema handler.
    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,
    };
  • MCP tool schema definition: name, detailed description with input policy for doorstromers, and inputSchema specifying properties (aanvrager, waarde_huidige_woning, bestaande_hypotheek with leningdelen array, nieuwe_woning) and required fields. Returned by ListToolsRequestSchema.
          {
            name: "opzet_hypotheek_doorstromer",
            description: `Opzet-berekening voor doorstromers met een CONCRETE nieuwe woning. Gebruik dit zodra er een koopprijs/verbouwing bekend is; hiermee ziet de gebruiker exact hoe bestaand en nieuw samenkomen. Voor algemene verhuis-oriëntatie zonder specifieke woning gebruikt u de maximale-hypotheek tools.
    
    **Invoerbeleid bestaande hypotheek (verplicht expliciet vragen):**
    - Stel altijd de vraag: "Wilt u een snelle globale berekening (met een samenvatting van uw hypotheek) of een detailberekening waarbij u alle leningdelen invoert?"
    - Bij snelle globale berekening: laat de gebruiker één samenvattende set waarden geven (totale schuld, gemiddelde rente, resterende looptijd, optioneel huidige maandlast) en vul hiermee één leningdeel.
    - Bij detailberekening: laat de gebruiker alle leningdelen kopiëren/plakken (hoofdsom, rente, looptijd, rentevast, hypotheekvorm) en vul de leningdelen-array één-op-één.`,
            inputSchema: {
              type: "object",
              description: `Gebruik basisintake, huidige woning en bestaande leningdelen; zie ${OPZET_GUIDE_URI} voor detailvelden en defaults.`,
              properties: {
                aanvrager: aanvragerSchema,
                waarde_huidige_woning: {
                  type: "number",
                  description: "Marktwaarde van de huidige woning.",
                },
                bestaande_hypotheek: {
                  ...bestaandeHypotheekSchema,
                },
                nieuwe_woning: {
                  ...nieuweWoningSchema,
                },
                session_id: {
                  type: "string",
                  description: "Optioneel sessie-ID vanuit n8n (voor logging).",
                },
              },
              required: [
                "aanvrager",
                "waarde_huidige_woning",
                "bestaande_hypotheek",
                "nieuwe_woning",
              ],
            },
          },
  • Normalization helper: wraps normalizeOpzetAanvragerShape and normalizes bestaande_hypotheek (including leningdelen field mappings). Called in handler at line 675.
    export function normalizeOpzetDoorstromerArgs(args: any): any {
      const normalized = normalizeOpzetAanvragerShape(args);
      if (normalized?.bestaande_hypotheek) {
        normalized.bestaande_hypotheek = normalizeBestaandeHypotheek(normalized.bestaande_hypotheek);
      }
      return normalized;
    }
  • TypeScript interface defining input shape for the tool: extends OpzetBaseArguments with nieuwe_woning, waarde_huidige_woning, and bestaande_hypotheek.
    interface OpzetDoorstromerArguments extends OpzetBaseArguments {
      nieuwe_woning: NieuweWoning;
      waarde_huidige_woning: number;
      bestaande_hypotheek: BestaandeHypotheek;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While it states what the tool calculates and its output format, it doesn't disclose important behavioral aspects such as whether this is a read-only calculation or if it creates/modifies data, what permissions might be required, whether there are rate limits, or how errors are handled. For a complex calculation tool with 11 parameters, this represents a significant gap in transparency.

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 perfectly concise and well-structured in two sentences. The first sentence states the purpose and target users, while the second clearly outlines the output format. Every word earns its place with zero redundancy or unnecessary information.

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

Completeness3/5

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

Given the tool's complexity (11 parameters with nested objects), lack of annotations, and no output schema, the description is somewhat incomplete. While it states the purpose and output format, it doesn't provide guidance on how the calculation works, what assumptions are made, or what the tool returns beyond the listed output components. For a mortgage calculation tool, more context about the calculation methodology would be helpful.

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?

The description adds minimal parameter semantics beyond what the schema provides. It mentions the tool calculates based on 'bestaande woning' (existing home) which relates to some parameters, but doesn't explain parameter relationships or calculation logic. With 100% schema description coverage, the baseline is 3, and the description doesn't significantly enhance understanding of parameter meanings or interactions.

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's purpose with specific verbs and resources: 'Berekent de hypotheekopzet voor doorstromers met bestaande woning' (Calculates mortgage setup for movers with existing home). It explicitly distinguishes itself from sibling tools by specifying 'doorstromers' (movers) and 'met bestaande woning' (with existing home), which differentiates it from tools like 'opzet_hypotheek_starter' or 'opzet_hypotheek_uitgebreid'.

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

Usage Guidelines4/5

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

The description provides clear context about when to use this tool: for 'doorstromers met bestaande woning' (movers with existing home). This implicitly suggests it's not for starters or those without existing properties. However, it doesn't explicitly state when NOT to use it or name specific alternative tools for different scenarios, which prevents a perfect score.

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