You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 97a2e09
Browse filesBrowse the repository at this point in the historyBrowse files
// One page activates at most 20 schemas: callers can page a broad search instead
14
+
// of inadvertently expanding the entire catalog into their client's context.
15
+
constpageSize=z.int().min(1).max(20).default(3);
16
+
constinputSchema=z
17
+
.strictObject({
18
+
query: z
19
+
.string()
20
+
.trim()
21
+
.optional()
22
+
.describe(
23
+
"Case-insensitive words matched against tool names and descriptions; all words must match. Omit to browse.",
24
+
),
25
+
names: z
26
+
.array(z.string().min(1))
27
+
.min(1)
28
+
.max(20)
29
+
.optional()
30
+
.describe("Exact tool names to load instead of searching."),
31
+
offset: z.int().min(0).default(0),
32
+
limit: pageSize.describe(
33
+
"Search page size; does not apply to exact names.",
34
+
),
35
+
})
36
+
.refine(
37
+
(input)=>
38
+
input.names===undefined||
39
+
(input.query===undefined&&input.offset===0),
40
+
{
41
+
message: "Use names alone, or query with offset/limit.",
42
+
},
43
+
);
44
+
constoutputSchema=z.strictObject({
45
+
profile: z.literal("hot-cold"),
46
+
inventory_count: z.int().nonnegative(),
47
+
loaded_count: z.int().nonnegative(),
48
+
total_matches: z.int().nonnegative(),
49
+
next_offset: z.int().nonnegative().nullable(),
50
+
tools: z.array(
51
+
z.strictObject({
52
+
name: z.string(),
53
+
description: z
54
+
.string()
55
+
.describe(
56
+
"Abbreviated canonical description; read tools/list for the complete contract.",
57
+
),
58
+
input_schema: z
59
+
.record(z.string(),z.unknown())
60
+
.describe(
61
+
"The configured advertised input schema for calling this named tool.",
62
+
),
63
+
}),
64
+
),
65
+
next_step: z.string(),
66
+
});
67
+
68
+
exportconstDISCOVER_TOOLS={
69
+
name: "discover_tools",
70
+
description:
71
+
"Find and load REA tools on demand. Search by task keywords (for example javascript, sqlite, strings, imports), or supply exact names. Returned tools become callable with their original names and full schemas after your client refreshes tools/list. Loaded tools remain available for this connection. This only changes catalog visibility; it does not run analysis or grant execution authority. If tools do not appear, enable MCP catalog refresh in your client or use REA_MCP_TOOL_CATALOG_PROFILE=full.",
'REA_MCP_TOOL_CATALOG_PROFILE must be "full" (default) or "hot-cold". Hot/cold requires a client that refreshes tools after notifications/tools/list_changed.';
0 commit comments