fdic-mcp-server 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -19
- package/dist/index.js +127 -21
- package/dist/server.js +127 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -93,24 +93,6 @@ git push origin main --follow-tags
|
|
|
93
93
|
|
|
94
94
|
Publishing from GitHub Actions is intended to use npm trusted publishing via GitHub Actions OIDC rather than a long-lived `NPM_TOKEN`.
|
|
95
95
|
|
|
96
|
-
### Local Secrets With direnv
|
|
97
|
-
|
|
98
|
-
To keep tokens local to this repo without committing them:
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
cp .envrc.example .envrc
|
|
102
|
-
$EDITOR .envrc
|
|
103
|
-
direnv allow
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Example `.envrc` entry:
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
export GITHUB_TOKEN="your_pat_here"
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
The repo ignores `.envrc`, `.envrc.local`, and `.env` so local secrets stay untracked.
|
|
113
|
-
|
|
114
96
|
## Usage
|
|
115
97
|
|
|
116
98
|
### CLI bundle
|
|
@@ -191,7 +173,7 @@ sort_order: DESC
|
|
|
191
173
|
## Response Shape
|
|
192
174
|
|
|
193
175
|
All tools return:
|
|
194
|
-
- human-readable
|
|
176
|
+
- a human-readable text representation in `content[0].text`
|
|
195
177
|
- machine-readable data in `structuredContent`
|
|
196
178
|
|
|
197
179
|
Typical search response shape:
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var import_streamableHttp = require("@modelcontextprotocol/sdk/server/streamable
|
|
|
30
30
|
var import_express = __toESM(require("express"));
|
|
31
31
|
|
|
32
32
|
// src/constants.ts
|
|
33
|
-
var VERSION = true ? "1.0.
|
|
33
|
+
var VERSION = true ? "1.0.6" : process.env.npm_package_version ?? "0.0.0-dev";
|
|
34
34
|
var FDIC_API_BASE_URL = "https://banks.data.fdic.gov/api";
|
|
35
35
|
var CHARACTER_LIMIT = 5e4;
|
|
36
36
|
var ENDPOINTS = {
|
|
@@ -111,6 +111,37 @@ function truncateIfNeeded(text, charLimit) {
|
|
|
111
111
|
|
|
112
112
|
[Response truncated at ${charLimit} characters. Use limit/offset parameters to paginate or narrow your query with filters.]`;
|
|
113
113
|
}
|
|
114
|
+
function formatValue(value) {
|
|
115
|
+
if (value === null || value === void 0) return "n/a";
|
|
116
|
+
if (typeof value === "number") return Number.isInteger(value) ? `${value}` : value.toFixed(4);
|
|
117
|
+
if (typeof value === "string") return value;
|
|
118
|
+
if (typeof value === "boolean") return value ? "true" : "false";
|
|
119
|
+
return JSON.stringify(value);
|
|
120
|
+
}
|
|
121
|
+
function summarizeRecord(record, preferredKeys, maxFields = 4) {
|
|
122
|
+
const orderedKeys = [
|
|
123
|
+
...preferredKeys.filter((key) => key in record),
|
|
124
|
+
...Object.keys(record).filter(
|
|
125
|
+
(key) => key !== "ID" && !preferredKeys.includes(key)
|
|
126
|
+
)
|
|
127
|
+
];
|
|
128
|
+
return orderedKeys.slice(0, maxFields).map((key) => `${key}: ${formatValue(record[key])}`).join(" | ");
|
|
129
|
+
}
|
|
130
|
+
function formatSearchResultText(label, records, pagination, preferredKeys) {
|
|
131
|
+
const header = `Found ${pagination.total} ${label} (showing ${pagination.count}, offset ${pagination.offset}).`;
|
|
132
|
+
if (records.length === 0) {
|
|
133
|
+
return header;
|
|
134
|
+
}
|
|
135
|
+
const rows = records.map((record, index) => `${index + 1}. ${summarizeRecord(record, preferredKeys)}`).join("\n");
|
|
136
|
+
const footer = pagination.has_more ? `
|
|
137
|
+
More results available. Use offset ${pagination.next_offset} to continue.` : "";
|
|
138
|
+
return `${header}
|
|
139
|
+
${rows}${footer}`;
|
|
140
|
+
}
|
|
141
|
+
function formatLookupResultText(label, record, preferredKeys) {
|
|
142
|
+
return `${label}
|
|
143
|
+
${summarizeRecord(record, preferredKeys, 8)}`;
|
|
144
|
+
}
|
|
114
145
|
function formatToolError(err) {
|
|
115
146
|
const message = err instanceof Error ? err.message : String(err);
|
|
116
147
|
return {
|
|
@@ -183,7 +214,7 @@ Args:
|
|
|
183
214
|
- sort_by (string, optional): Field to sort by
|
|
184
215
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'ASC')
|
|
185
216
|
|
|
186
|
-
|
|
217
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and institution records.`,
|
|
187
218
|
inputSchema: CommonQuerySchema,
|
|
188
219
|
annotations: {
|
|
189
220
|
readOnlyHint: true,
|
|
@@ -203,7 +234,14 @@ Returns JSON with { total, offset, count, has_more, next_offset?, institutions[]
|
|
|
203
234
|
);
|
|
204
235
|
const output = { ...pagination, institutions: records };
|
|
205
236
|
const text = truncateIfNeeded(
|
|
206
|
-
|
|
237
|
+
formatSearchResultText("institutions", records, pagination, [
|
|
238
|
+
"CERT",
|
|
239
|
+
"NAME",
|
|
240
|
+
"CITY",
|
|
241
|
+
"STALP",
|
|
242
|
+
"ASSET",
|
|
243
|
+
"ACTIVE"
|
|
244
|
+
]),
|
|
207
245
|
CHARACTER_LIMIT
|
|
208
246
|
);
|
|
209
247
|
return {
|
|
@@ -227,7 +265,7 @@ Args:
|
|
|
227
265
|
- cert (number): FDIC Certificate Number (e.g., 3511 for Bank of America)
|
|
228
266
|
- fields (string, optional): Comma-separated list of fields to return
|
|
229
267
|
|
|
230
|
-
Returns
|
|
268
|
+
Returns a detailed institution profile suitable for concise summaries, with structured fields available for exact values when needed.`,
|
|
231
269
|
inputSchema: CertSchema,
|
|
232
270
|
annotations: {
|
|
233
271
|
readOnlyHint: true,
|
|
@@ -256,7 +294,16 @@ Returns full institution profile including financial metrics, charter info, loca
|
|
|
256
294
|
};
|
|
257
295
|
}
|
|
258
296
|
const output = records[0];
|
|
259
|
-
const text =
|
|
297
|
+
const text = formatLookupResultText("Institution details", output, [
|
|
298
|
+
"CERT",
|
|
299
|
+
"NAME",
|
|
300
|
+
"CITY",
|
|
301
|
+
"STALP",
|
|
302
|
+
"ASSET",
|
|
303
|
+
"DEP",
|
|
304
|
+
"ACTIVE",
|
|
305
|
+
"REGAGNT"
|
|
306
|
+
]);
|
|
260
307
|
return {
|
|
261
308
|
content: [{ type: "text", text }],
|
|
262
309
|
structuredContent: output
|
|
@@ -304,7 +351,7 @@ Args:
|
|
|
304
351
|
- sort_by (string, optional): Field to sort by (e.g., FAILDATE, COST)
|
|
305
352
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'ASC')
|
|
306
353
|
|
|
307
|
-
|
|
354
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and failure records.`,
|
|
308
355
|
inputSchema: CommonQuerySchema,
|
|
309
356
|
annotations: {
|
|
310
357
|
readOnlyHint: true,
|
|
@@ -324,7 +371,15 @@ Returns JSON with { total, offset, count, has_more, next_offset?, failures[] }`,
|
|
|
324
371
|
);
|
|
325
372
|
const output = { ...pagination, failures: records };
|
|
326
373
|
const text = truncateIfNeeded(
|
|
327
|
-
|
|
374
|
+
formatSearchResultText("failures", records, pagination, [
|
|
375
|
+
"CERT",
|
|
376
|
+
"NAME",
|
|
377
|
+
"CITY",
|
|
378
|
+
"STALP",
|
|
379
|
+
"FAILDATE",
|
|
380
|
+
"COST",
|
|
381
|
+
"RESTYPE"
|
|
382
|
+
]),
|
|
328
383
|
CHARACTER_LIMIT
|
|
329
384
|
);
|
|
330
385
|
return {
|
|
@@ -348,7 +403,7 @@ Args:
|
|
|
348
403
|
- cert (number): FDIC Certificate Number of the failed institution
|
|
349
404
|
- fields (string, optional): Comma-separated list of fields to return
|
|
350
405
|
|
|
351
|
-
Returns failure
|
|
406
|
+
Returns detailed failure information suitable for concise summaries, with structured fields available for exact values when needed.`,
|
|
352
407
|
inputSchema: CertSchema,
|
|
353
408
|
annotations: {
|
|
354
409
|
readOnlyHint: true,
|
|
@@ -377,7 +432,16 @@ Returns failure details including failure date, resolution method, and cost to F
|
|
|
377
432
|
};
|
|
378
433
|
}
|
|
379
434
|
const output = records[0];
|
|
380
|
-
const text =
|
|
435
|
+
const text = formatLookupResultText("Failure details", output, [
|
|
436
|
+
"CERT",
|
|
437
|
+
"NAME",
|
|
438
|
+
"FAILDATE",
|
|
439
|
+
"RESTYPE",
|
|
440
|
+
"COST",
|
|
441
|
+
"QBFASSET",
|
|
442
|
+
"CITY",
|
|
443
|
+
"STALP"
|
|
444
|
+
]);
|
|
381
445
|
return {
|
|
382
446
|
content: [{ type: "text", text }],
|
|
383
447
|
structuredContent: output
|
|
@@ -435,7 +499,7 @@ Args:
|
|
|
435
499
|
- sort_by (string, optional): Field to sort by
|
|
436
500
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'ASC')
|
|
437
501
|
|
|
438
|
-
|
|
502
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and branch location records.`,
|
|
439
503
|
inputSchema: LocationQuerySchema,
|
|
440
504
|
annotations: {
|
|
441
505
|
readOnlyHint: true,
|
|
@@ -462,7 +526,14 @@ Returns JSON with { total, offset, count, has_more, next_offset?, locations[] }`
|
|
|
462
526
|
);
|
|
463
527
|
const output = { ...pagination, locations: records };
|
|
464
528
|
const text = truncateIfNeeded(
|
|
465
|
-
|
|
529
|
+
formatSearchResultText("locations", records, pagination, [
|
|
530
|
+
"CERT",
|
|
531
|
+
"UNINAME",
|
|
532
|
+
"NAMEFULL",
|
|
533
|
+
"CITY",
|
|
534
|
+
"STALP",
|
|
535
|
+
"BRNUM"
|
|
536
|
+
]),
|
|
466
537
|
CHARACTER_LIMIT
|
|
467
538
|
);
|
|
468
539
|
return {
|
|
@@ -523,7 +594,7 @@ Args:
|
|
|
523
594
|
- sort_by (string, optional): Field to sort by (e.g., PROCDATE)
|
|
524
595
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'ASC')
|
|
525
596
|
|
|
526
|
-
|
|
597
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and event records.`,
|
|
527
598
|
inputSchema: HistoryQuerySchema,
|
|
528
599
|
annotations: {
|
|
529
600
|
readOnlyHint: true,
|
|
@@ -550,7 +621,14 @@ Returns JSON with { total, offset, count, has_more, next_offset?, events[] }`,
|
|
|
550
621
|
);
|
|
551
622
|
const output = { ...pagination, events: records };
|
|
552
623
|
const text = truncateIfNeeded(
|
|
553
|
-
|
|
624
|
+
formatSearchResultText("events", records, pagination, [
|
|
625
|
+
"CERT",
|
|
626
|
+
"INSTNAME",
|
|
627
|
+
"TYPE",
|
|
628
|
+
"PROCDATE",
|
|
629
|
+
"PCITY",
|
|
630
|
+
"PSTALP"
|
|
631
|
+
]),
|
|
554
632
|
CHARACTER_LIMIT
|
|
555
633
|
);
|
|
556
634
|
return {
|
|
@@ -620,7 +698,7 @@ Args:
|
|
|
620
698
|
- sort_by (string, optional): Field to sort by
|
|
621
699
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'DESC' recommended for most recent first)
|
|
622
700
|
|
|
623
|
-
|
|
701
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and quarterly financial records.`,
|
|
624
702
|
inputSchema: FinancialQuerySchema,
|
|
625
703
|
annotations: {
|
|
626
704
|
readOnlyHint: true,
|
|
@@ -647,7 +725,14 @@ Returns JSON with { total, offset, count, has_more, next_offset?, financials[] }
|
|
|
647
725
|
);
|
|
648
726
|
const output = { ...pagination, financials: records };
|
|
649
727
|
const text = truncateIfNeeded(
|
|
650
|
-
|
|
728
|
+
formatSearchResultText("financial records", records, pagination, [
|
|
729
|
+
"CERT",
|
|
730
|
+
"NAME",
|
|
731
|
+
"REPDTE",
|
|
732
|
+
"ASSET",
|
|
733
|
+
"DEP",
|
|
734
|
+
"NETINC"
|
|
735
|
+
]),
|
|
651
736
|
CHARACTER_LIMIT
|
|
652
737
|
);
|
|
653
738
|
return {
|
|
@@ -695,7 +780,7 @@ Args:
|
|
|
695
780
|
- sort_by (string, optional): Field to sort by (e.g., YEAR, ASSET)
|
|
696
781
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'ASC')
|
|
697
782
|
|
|
698
|
-
|
|
783
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and annual summary records.`,
|
|
699
784
|
inputSchema: SummaryQuerySchema,
|
|
700
785
|
annotations: {
|
|
701
786
|
readOnlyHint: true,
|
|
@@ -722,7 +807,14 @@ Returns JSON with { total, offset, count, has_more, next_offset?, summary[] }`,
|
|
|
722
807
|
);
|
|
723
808
|
const output = { ...pagination, summary: records };
|
|
724
809
|
const text = truncateIfNeeded(
|
|
725
|
-
|
|
810
|
+
formatSearchResultText("annual summary records", records, pagination, [
|
|
811
|
+
"CERT",
|
|
812
|
+
"YEAR",
|
|
813
|
+
"ASSET",
|
|
814
|
+
"DEP",
|
|
815
|
+
"NETINC",
|
|
816
|
+
"ROA"
|
|
817
|
+
]),
|
|
726
818
|
CHARACTER_LIMIT
|
|
727
819
|
);
|
|
728
820
|
return {
|
|
@@ -784,7 +876,7 @@ Args:
|
|
|
784
876
|
- sort_by (string, optional): Field to sort by (e.g., DEPSUMBR, YEAR)
|
|
785
877
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'ASC')
|
|
786
878
|
|
|
787
|
-
|
|
879
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and deposit records.`,
|
|
788
880
|
inputSchema: SodQuerySchema,
|
|
789
881
|
annotations: {
|
|
790
882
|
readOnlyHint: true,
|
|
@@ -811,7 +903,14 @@ Returns JSON with { total, offset, count, has_more, next_offset?, deposits[] }`,
|
|
|
811
903
|
);
|
|
812
904
|
const output = { ...pagination, deposits: records };
|
|
813
905
|
const text = truncateIfNeeded(
|
|
814
|
-
|
|
906
|
+
formatSearchResultText("deposit records", records, pagination, [
|
|
907
|
+
"CERT",
|
|
908
|
+
"YEAR",
|
|
909
|
+
"UNINAME",
|
|
910
|
+
"NAMEFULL",
|
|
911
|
+
"CITYBR",
|
|
912
|
+
"DEPSUMBR"
|
|
913
|
+
]),
|
|
815
914
|
CHARACTER_LIMIT
|
|
816
915
|
);
|
|
817
916
|
return {
|
|
@@ -873,7 +972,7 @@ Args:
|
|
|
873
972
|
- sort_by (string, optional): Field to sort by
|
|
874
973
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'ASC')
|
|
875
974
|
|
|
876
|
-
|
|
975
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and demographic records.`,
|
|
877
976
|
inputSchema: DemographicsQuerySchema,
|
|
878
977
|
annotations: {
|
|
879
978
|
readOnlyHint: true,
|
|
@@ -900,7 +999,14 @@ Returns JSON with { total, offset, count, has_more, next_offset?, demographics[]
|
|
|
900
999
|
);
|
|
901
1000
|
const output = { ...pagination, demographics: records };
|
|
902
1001
|
const text = truncateIfNeeded(
|
|
903
|
-
|
|
1002
|
+
formatSearchResultText("demographic records", records, pagination, [
|
|
1003
|
+
"CERT",
|
|
1004
|
+
"REPDTE",
|
|
1005
|
+
"OFFTOT",
|
|
1006
|
+
"OFFSTATE",
|
|
1007
|
+
"METRO",
|
|
1008
|
+
"CBSANAME"
|
|
1009
|
+
]),
|
|
904
1010
|
CHARACTER_LIMIT
|
|
905
1011
|
);
|
|
906
1012
|
return {
|
package/dist/server.js
CHANGED
|
@@ -41,7 +41,7 @@ var import_streamableHttp = require("@modelcontextprotocol/sdk/server/streamable
|
|
|
41
41
|
var import_express = __toESM(require("express"));
|
|
42
42
|
|
|
43
43
|
// src/constants.ts
|
|
44
|
-
var VERSION = true ? "1.0.
|
|
44
|
+
var VERSION = true ? "1.0.6" : process.env.npm_package_version ?? "0.0.0-dev";
|
|
45
45
|
var FDIC_API_BASE_URL = "https://banks.data.fdic.gov/api";
|
|
46
46
|
var CHARACTER_LIMIT = 5e4;
|
|
47
47
|
var ENDPOINTS = {
|
|
@@ -122,6 +122,37 @@ function truncateIfNeeded(text, charLimit) {
|
|
|
122
122
|
|
|
123
123
|
[Response truncated at ${charLimit} characters. Use limit/offset parameters to paginate or narrow your query with filters.]`;
|
|
124
124
|
}
|
|
125
|
+
function formatValue(value) {
|
|
126
|
+
if (value === null || value === void 0) return "n/a";
|
|
127
|
+
if (typeof value === "number") return Number.isInteger(value) ? `${value}` : value.toFixed(4);
|
|
128
|
+
if (typeof value === "string") return value;
|
|
129
|
+
if (typeof value === "boolean") return value ? "true" : "false";
|
|
130
|
+
return JSON.stringify(value);
|
|
131
|
+
}
|
|
132
|
+
function summarizeRecord(record, preferredKeys, maxFields = 4) {
|
|
133
|
+
const orderedKeys = [
|
|
134
|
+
...preferredKeys.filter((key) => key in record),
|
|
135
|
+
...Object.keys(record).filter(
|
|
136
|
+
(key) => key !== "ID" && !preferredKeys.includes(key)
|
|
137
|
+
)
|
|
138
|
+
];
|
|
139
|
+
return orderedKeys.slice(0, maxFields).map((key) => `${key}: ${formatValue(record[key])}`).join(" | ");
|
|
140
|
+
}
|
|
141
|
+
function formatSearchResultText(label, records, pagination, preferredKeys) {
|
|
142
|
+
const header = `Found ${pagination.total} ${label} (showing ${pagination.count}, offset ${pagination.offset}).`;
|
|
143
|
+
if (records.length === 0) {
|
|
144
|
+
return header;
|
|
145
|
+
}
|
|
146
|
+
const rows = records.map((record, index) => `${index + 1}. ${summarizeRecord(record, preferredKeys)}`).join("\n");
|
|
147
|
+
const footer = pagination.has_more ? `
|
|
148
|
+
More results available. Use offset ${pagination.next_offset} to continue.` : "";
|
|
149
|
+
return `${header}
|
|
150
|
+
${rows}${footer}`;
|
|
151
|
+
}
|
|
152
|
+
function formatLookupResultText(label, record, preferredKeys) {
|
|
153
|
+
return `${label}
|
|
154
|
+
${summarizeRecord(record, preferredKeys, 8)}`;
|
|
155
|
+
}
|
|
125
156
|
function formatToolError(err) {
|
|
126
157
|
const message = err instanceof Error ? err.message : String(err);
|
|
127
158
|
return {
|
|
@@ -194,7 +225,7 @@ Args:
|
|
|
194
225
|
- sort_by (string, optional): Field to sort by
|
|
195
226
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'ASC')
|
|
196
227
|
|
|
197
|
-
|
|
228
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and institution records.`,
|
|
198
229
|
inputSchema: CommonQuerySchema,
|
|
199
230
|
annotations: {
|
|
200
231
|
readOnlyHint: true,
|
|
@@ -214,7 +245,14 @@ Returns JSON with { total, offset, count, has_more, next_offset?, institutions[]
|
|
|
214
245
|
);
|
|
215
246
|
const output = { ...pagination, institutions: records };
|
|
216
247
|
const text = truncateIfNeeded(
|
|
217
|
-
|
|
248
|
+
formatSearchResultText("institutions", records, pagination, [
|
|
249
|
+
"CERT",
|
|
250
|
+
"NAME",
|
|
251
|
+
"CITY",
|
|
252
|
+
"STALP",
|
|
253
|
+
"ASSET",
|
|
254
|
+
"ACTIVE"
|
|
255
|
+
]),
|
|
218
256
|
CHARACTER_LIMIT
|
|
219
257
|
);
|
|
220
258
|
return {
|
|
@@ -238,7 +276,7 @@ Args:
|
|
|
238
276
|
- cert (number): FDIC Certificate Number (e.g., 3511 for Bank of America)
|
|
239
277
|
- fields (string, optional): Comma-separated list of fields to return
|
|
240
278
|
|
|
241
|
-
Returns
|
|
279
|
+
Returns a detailed institution profile suitable for concise summaries, with structured fields available for exact values when needed.`,
|
|
242
280
|
inputSchema: CertSchema,
|
|
243
281
|
annotations: {
|
|
244
282
|
readOnlyHint: true,
|
|
@@ -267,7 +305,16 @@ Returns full institution profile including financial metrics, charter info, loca
|
|
|
267
305
|
};
|
|
268
306
|
}
|
|
269
307
|
const output = records[0];
|
|
270
|
-
const text =
|
|
308
|
+
const text = formatLookupResultText("Institution details", output, [
|
|
309
|
+
"CERT",
|
|
310
|
+
"NAME",
|
|
311
|
+
"CITY",
|
|
312
|
+
"STALP",
|
|
313
|
+
"ASSET",
|
|
314
|
+
"DEP",
|
|
315
|
+
"ACTIVE",
|
|
316
|
+
"REGAGNT"
|
|
317
|
+
]);
|
|
271
318
|
return {
|
|
272
319
|
content: [{ type: "text", text }],
|
|
273
320
|
structuredContent: output
|
|
@@ -315,7 +362,7 @@ Args:
|
|
|
315
362
|
- sort_by (string, optional): Field to sort by (e.g., FAILDATE, COST)
|
|
316
363
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'ASC')
|
|
317
364
|
|
|
318
|
-
|
|
365
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and failure records.`,
|
|
319
366
|
inputSchema: CommonQuerySchema,
|
|
320
367
|
annotations: {
|
|
321
368
|
readOnlyHint: true,
|
|
@@ -335,7 +382,15 @@ Returns JSON with { total, offset, count, has_more, next_offset?, failures[] }`,
|
|
|
335
382
|
);
|
|
336
383
|
const output = { ...pagination, failures: records };
|
|
337
384
|
const text = truncateIfNeeded(
|
|
338
|
-
|
|
385
|
+
formatSearchResultText("failures", records, pagination, [
|
|
386
|
+
"CERT",
|
|
387
|
+
"NAME",
|
|
388
|
+
"CITY",
|
|
389
|
+
"STALP",
|
|
390
|
+
"FAILDATE",
|
|
391
|
+
"COST",
|
|
392
|
+
"RESTYPE"
|
|
393
|
+
]),
|
|
339
394
|
CHARACTER_LIMIT
|
|
340
395
|
);
|
|
341
396
|
return {
|
|
@@ -359,7 +414,7 @@ Args:
|
|
|
359
414
|
- cert (number): FDIC Certificate Number of the failed institution
|
|
360
415
|
- fields (string, optional): Comma-separated list of fields to return
|
|
361
416
|
|
|
362
|
-
Returns failure
|
|
417
|
+
Returns detailed failure information suitable for concise summaries, with structured fields available for exact values when needed.`,
|
|
363
418
|
inputSchema: CertSchema,
|
|
364
419
|
annotations: {
|
|
365
420
|
readOnlyHint: true,
|
|
@@ -388,7 +443,16 @@ Returns failure details including failure date, resolution method, and cost to F
|
|
|
388
443
|
};
|
|
389
444
|
}
|
|
390
445
|
const output = records[0];
|
|
391
|
-
const text =
|
|
446
|
+
const text = formatLookupResultText("Failure details", output, [
|
|
447
|
+
"CERT",
|
|
448
|
+
"NAME",
|
|
449
|
+
"FAILDATE",
|
|
450
|
+
"RESTYPE",
|
|
451
|
+
"COST",
|
|
452
|
+
"QBFASSET",
|
|
453
|
+
"CITY",
|
|
454
|
+
"STALP"
|
|
455
|
+
]);
|
|
392
456
|
return {
|
|
393
457
|
content: [{ type: "text", text }],
|
|
394
458
|
structuredContent: output
|
|
@@ -446,7 +510,7 @@ Args:
|
|
|
446
510
|
- sort_by (string, optional): Field to sort by
|
|
447
511
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'ASC')
|
|
448
512
|
|
|
449
|
-
|
|
513
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and branch location records.`,
|
|
450
514
|
inputSchema: LocationQuerySchema,
|
|
451
515
|
annotations: {
|
|
452
516
|
readOnlyHint: true,
|
|
@@ -473,7 +537,14 @@ Returns JSON with { total, offset, count, has_more, next_offset?, locations[] }`
|
|
|
473
537
|
);
|
|
474
538
|
const output = { ...pagination, locations: records };
|
|
475
539
|
const text = truncateIfNeeded(
|
|
476
|
-
|
|
540
|
+
formatSearchResultText("locations", records, pagination, [
|
|
541
|
+
"CERT",
|
|
542
|
+
"UNINAME",
|
|
543
|
+
"NAMEFULL",
|
|
544
|
+
"CITY",
|
|
545
|
+
"STALP",
|
|
546
|
+
"BRNUM"
|
|
547
|
+
]),
|
|
477
548
|
CHARACTER_LIMIT
|
|
478
549
|
);
|
|
479
550
|
return {
|
|
@@ -534,7 +605,7 @@ Args:
|
|
|
534
605
|
- sort_by (string, optional): Field to sort by (e.g., PROCDATE)
|
|
535
606
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'ASC')
|
|
536
607
|
|
|
537
|
-
|
|
608
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and event records.`,
|
|
538
609
|
inputSchema: HistoryQuerySchema,
|
|
539
610
|
annotations: {
|
|
540
611
|
readOnlyHint: true,
|
|
@@ -561,7 +632,14 @@ Returns JSON with { total, offset, count, has_more, next_offset?, events[] }`,
|
|
|
561
632
|
);
|
|
562
633
|
const output = { ...pagination, events: records };
|
|
563
634
|
const text = truncateIfNeeded(
|
|
564
|
-
|
|
635
|
+
formatSearchResultText("events", records, pagination, [
|
|
636
|
+
"CERT",
|
|
637
|
+
"INSTNAME",
|
|
638
|
+
"TYPE",
|
|
639
|
+
"PROCDATE",
|
|
640
|
+
"PCITY",
|
|
641
|
+
"PSTALP"
|
|
642
|
+
]),
|
|
565
643
|
CHARACTER_LIMIT
|
|
566
644
|
);
|
|
567
645
|
return {
|
|
@@ -631,7 +709,7 @@ Args:
|
|
|
631
709
|
- sort_by (string, optional): Field to sort by
|
|
632
710
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'DESC' recommended for most recent first)
|
|
633
711
|
|
|
634
|
-
|
|
712
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and quarterly financial records.`,
|
|
635
713
|
inputSchema: FinancialQuerySchema,
|
|
636
714
|
annotations: {
|
|
637
715
|
readOnlyHint: true,
|
|
@@ -658,7 +736,14 @@ Returns JSON with { total, offset, count, has_more, next_offset?, financials[] }
|
|
|
658
736
|
);
|
|
659
737
|
const output = { ...pagination, financials: records };
|
|
660
738
|
const text = truncateIfNeeded(
|
|
661
|
-
|
|
739
|
+
formatSearchResultText("financial records", records, pagination, [
|
|
740
|
+
"CERT",
|
|
741
|
+
"NAME",
|
|
742
|
+
"REPDTE",
|
|
743
|
+
"ASSET",
|
|
744
|
+
"DEP",
|
|
745
|
+
"NETINC"
|
|
746
|
+
]),
|
|
662
747
|
CHARACTER_LIMIT
|
|
663
748
|
);
|
|
664
749
|
return {
|
|
@@ -706,7 +791,7 @@ Args:
|
|
|
706
791
|
- sort_by (string, optional): Field to sort by (e.g., YEAR, ASSET)
|
|
707
792
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'ASC')
|
|
708
793
|
|
|
709
|
-
|
|
794
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and annual summary records.`,
|
|
710
795
|
inputSchema: SummaryQuerySchema,
|
|
711
796
|
annotations: {
|
|
712
797
|
readOnlyHint: true,
|
|
@@ -733,7 +818,14 @@ Returns JSON with { total, offset, count, has_more, next_offset?, summary[] }`,
|
|
|
733
818
|
);
|
|
734
819
|
const output = { ...pagination, summary: records };
|
|
735
820
|
const text = truncateIfNeeded(
|
|
736
|
-
|
|
821
|
+
formatSearchResultText("annual summary records", records, pagination, [
|
|
822
|
+
"CERT",
|
|
823
|
+
"YEAR",
|
|
824
|
+
"ASSET",
|
|
825
|
+
"DEP",
|
|
826
|
+
"NETINC",
|
|
827
|
+
"ROA"
|
|
828
|
+
]),
|
|
737
829
|
CHARACTER_LIMIT
|
|
738
830
|
);
|
|
739
831
|
return {
|
|
@@ -795,7 +887,7 @@ Args:
|
|
|
795
887
|
- sort_by (string, optional): Field to sort by (e.g., DEPSUMBR, YEAR)
|
|
796
888
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'ASC')
|
|
797
889
|
|
|
798
|
-
|
|
890
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and deposit records.`,
|
|
799
891
|
inputSchema: SodQuerySchema,
|
|
800
892
|
annotations: {
|
|
801
893
|
readOnlyHint: true,
|
|
@@ -822,7 +914,14 @@ Returns JSON with { total, offset, count, has_more, next_offset?, deposits[] }`,
|
|
|
822
914
|
);
|
|
823
915
|
const output = { ...pagination, deposits: records };
|
|
824
916
|
const text = truncateIfNeeded(
|
|
825
|
-
|
|
917
|
+
formatSearchResultText("deposit records", records, pagination, [
|
|
918
|
+
"CERT",
|
|
919
|
+
"YEAR",
|
|
920
|
+
"UNINAME",
|
|
921
|
+
"NAMEFULL",
|
|
922
|
+
"CITYBR",
|
|
923
|
+
"DEPSUMBR"
|
|
924
|
+
]),
|
|
826
925
|
CHARACTER_LIMIT
|
|
827
926
|
);
|
|
828
927
|
return {
|
|
@@ -884,7 +983,7 @@ Args:
|
|
|
884
983
|
- sort_by (string, optional): Field to sort by
|
|
885
984
|
- sort_order ('ASC'|'DESC'): Sort direction (default: 'ASC')
|
|
886
985
|
|
|
887
|
-
|
|
986
|
+
Prefer concise human-readable summaries or tables when answering users. Structured fields are available for totals, pagination, and demographic records.`,
|
|
888
987
|
inputSchema: DemographicsQuerySchema,
|
|
889
988
|
annotations: {
|
|
890
989
|
readOnlyHint: true,
|
|
@@ -911,7 +1010,14 @@ Returns JSON with { total, offset, count, has_more, next_offset?, demographics[]
|
|
|
911
1010
|
);
|
|
912
1011
|
const output = { ...pagination, demographics: records };
|
|
913
1012
|
const text = truncateIfNeeded(
|
|
914
|
-
|
|
1013
|
+
formatSearchResultText("demographic records", records, pagination, [
|
|
1014
|
+
"CERT",
|
|
1015
|
+
"REPDTE",
|
|
1016
|
+
"OFFTOT",
|
|
1017
|
+
"OFFSTATE",
|
|
1018
|
+
"METRO",
|
|
1019
|
+
"CBSANAME"
|
|
1020
|
+
]),
|
|
915
1021
|
CHARACTER_LIMIT
|
|
916
1022
|
);
|
|
917
1023
|
return {
|