Loans - ToolGate tool package

examples.loans

Tools: loans.applicant, loans.credit-report, loans.evaluate, loans.offer, loans.record-decision. Part of the mocked tool examples.

By ToolGate Examples Signed

Java 17, protocol 2

Download

Use in ToolGate

In the ToolGate console, open Server packages, then Marketplace, and install this package. These values identify exactly what you install:

{
    "marketplace": "olo-labs-marketplace",
    "packageId": "examples.loans",
    "version": "0.1.0",
    "packageDigest": "sha256:0d95b2e853305ac8d2808315b7f4b87070575622adafcc1c1b9332236fda0432"
}

Overview

Bank loan approval (mocked)

Tools: loans.applicant, loans.credit-report, loans.evaluate, loans.offer, loans.record-decision. Part of the mocked tool examples.

A retail loan desk. loans.applicant and loans.credit-report return the applicant's profile and bureau summary. loans.evaluate applies written underwriting rules (credit score, recent defaults, debt-to-income including the new instalment, employment history) and returns APPROVE, REFER or DECLINE with every reason, the rate for the score band, the instalment, and the largest amount that would keep debt-to-income at 40%. loans.offer builds the EMI schedule. loans.record-decision records the outcome once per reference.

Applicant Situation Typical outcome
A-1001 Salaried, score 782, low debt APPROVE
A-1002 Score 668, high existing debt REFER, or DECLINE for a large amount
A-1003 Score 541, recent default DECLINE
A-1004 Self-employed, under a year in business REFER

The rules are deliberately simple and live in one method, so they are easy to read and to replace with your own credit policy.

Try it

cp toolgate.dev.example.json toolgate.dev.json   # never commit toolgate.dev.json
toolgate dev                                      # an MCP server over stdio
toolgate pack                                     # build/toolgate/bank-loan-0.1.0.tgpkg

Things to ask a model connected to it:

  • "Can we approve A-1001 for 25,000 over 36 months? Explain the decision."
  • "A-1002 wants 20,000. What is the most we could lend them at 36 months?"
  • "Show me the first three EMIs for A-1001's offer and record the approval for case 77."

Tools

loans.applicant Read only
Get applicant Returns a loan applicant's profile: employment, income, existing debt payments.
loans.credit-report Read only
Get credit report Returns the applicant's credit bureau summary: score, band, utilisation, late payments, defaults.
loans.evaluate Read only
Evaluate a loan Underwrites a requested loan for an applicant with the bank's (mocked) rules and returns APPROVE, REFER or DECLINE with reasons, rate, instalment, debt-to-income and the most that could be approved.
loans.offer Read only
Calculate an offer Calculates the monthly instalment (EMI), total interest and the first instalments of an amortising loan.
loans.record-decision Non idempotent
Record a decision Records the final loan decision for an applicant (mocked: nothing is stored). Recording again with the same reference returns the first record.

Settings it needs

No settings.

Versions

VersionAPI changeCompatibilityPublished
0.1.0 none Java 17, protocol 2 15 Oct 2026 - 11:55

Publisher

ToolGate Examples, OLO Labs

Publisher details are supplied by the publisher. Validation checks package format, not code safety.