# Glean custom tools for SecureLend

Bank IT can register SecureLend as Glean custom tools. The host to call is https://api.securelend.ai. These four actions return JSON only.

Paste the Glean OpenAPI document from the platform repo at docs/glean-openapi.yaml. That file describes only these four actions, with apiKey bearer security. The public contract at https://api.securelend.ai/openapi.json stays the placement, health, and lender MCP document.

## The four actions

- GET /v1/glean/package-status?caseId= returns status, missing documents, missing facts, gaps, and open items. This read does not draft a chase email.
- GET /v1/glean/ratios?caseId= returns a flat ratios list and any omitted ratios. It does not return a spreadsheet.
- POST /v1/glean/memo with caseId starts a draft memo and returns memoId, status, deskUrl, and dashboardUrl. The memo text stays on those links.
- POST /v1/glean/reviewer-link with caseId and an optional label returns a url. SecureLend read-only package share link. SecureLend does not email it. A human still distributes it. NOT an UWBench invite.

## Where to mint the key

Sign in to the desk and open Settings. Find Chat key. Choose Create key. Copy the key when it is shown. It starts with slm_. It is shown once.

The key is one workspace member. Glean calls SecureLend as that member. On the REST API the key is accepted only on these four actions.

## How to paste it into Glean

In Glean, add a custom OpenAPI tool. Paste the Glean OpenAPI document. Set the tool auth to a static bearer token and paste the slm_ key. SecureLend expects the header Authorization: Bearer followed by the key.

## The wrong surface

Market MCP (POST https://mcp.securelend.ai/mcp) is the wrong surface for these actions. Do not point the Glean tool at it. The Settings chat key is the credential. There is no Glean OAuth client and no client credentials grant.
