@talonic/mcp 0.1.75 → 0.1.76
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/CHANGELOG.md +7 -0
- package/README.md +7 -1
- package/dist/content.js +1131 -167
- package/dist/content.js.map +1 -1
- package/dist/http-server.js +384 -1
- package/dist/http-server.js.map +1 -1
- package/dist/index.js +384 -1
- package/dist/index.js.map +1 -1
- package/dist/server.js +384 -1
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/http-server.js
CHANGED
|
@@ -2294,9 +2294,384 @@ function registerToMarkdown(server, getTalonic) {
|
|
|
2294
2294
|
);
|
|
2295
2295
|
}
|
|
2296
2296
|
|
|
2297
|
+
// src/tools/_http.ts
|
|
2298
|
+
var DEFAULT_BASE3 = "https://api.talonic.com";
|
|
2299
|
+
function buildUrl(baseUrl, path, params = {}) {
|
|
2300
|
+
const qs = new URLSearchParams();
|
|
2301
|
+
for (const [k, v] of Object.entries(params)) {
|
|
2302
|
+
if (v === void 0 || v === "") continue;
|
|
2303
|
+
qs.set(k, String(v));
|
|
2304
|
+
}
|
|
2305
|
+
return `${baseUrl ?? DEFAULT_BASE3}${path}${qs.size ? `?${qs}` : ""}`;
|
|
2306
|
+
}
|
|
2307
|
+
async function apiJson(getToken, baseUrl, method, path, opts = {}) {
|
|
2308
|
+
const url = buildUrl(baseUrl, path, opts.params);
|
|
2309
|
+
const res = await fetch(url, {
|
|
2310
|
+
method,
|
|
2311
|
+
headers: {
|
|
2312
|
+
Authorization: `Bearer ${getToken()}`,
|
|
2313
|
+
Accept: "application/json",
|
|
2314
|
+
...opts.body !== void 0 ? { "Content-Type": "application/json" } : {}
|
|
2315
|
+
},
|
|
2316
|
+
...opts.body !== void 0 ? { body: JSON.stringify(opts.body) } : {}
|
|
2317
|
+
});
|
|
2318
|
+
if (!res.ok) {
|
|
2319
|
+
const text = await res.text().catch(() => "");
|
|
2320
|
+
throw new Error(`Talonic API error: HTTP ${res.status}${text ? ` \u2014 ${text}` : ""}`);
|
|
2321
|
+
}
|
|
2322
|
+
return await res.json();
|
|
2323
|
+
}
|
|
2324
|
+
async function runTool(fn) {
|
|
2325
|
+
try {
|
|
2326
|
+
return jsonOk(await fn());
|
|
2327
|
+
} catch (err) {
|
|
2328
|
+
return toolError(err);
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
|
|
2332
|
+
// src/tools/fields.ts
|
|
2333
|
+
var MATURITIES = ["core", "proven", "candidate"];
|
|
2334
|
+
var maturityArg = z.enum(MATURITIES).optional().describe(
|
|
2335
|
+
"Filter by maturity: `core` (universal, fully trusted \u2014 safe to build on), `proven` (recurring, stable id), `candidate` (newly discovered, may still be merged or renamed)."
|
|
2336
|
+
);
|
|
2337
|
+
var fieldIdArg = z.string().uuid().optional().describe("Field UUID (from talonic_list_fields / talonic_search).");
|
|
2338
|
+
var fieldNameArg = z.string().min(1).optional().describe(
|
|
2339
|
+
"Field NAME instead of an id \u2014 resolved through canonical name, synonyms, merge aliases and the registry's spelling fold, then followed to the live concept. Use the user's wording ('Invoice No', 'Vertragsnummer')."
|
|
2340
|
+
);
|
|
2341
|
+
async function resolveFieldId(getToken, baseUrl, args) {
|
|
2342
|
+
if (args.field_id) return { id: args.field_id };
|
|
2343
|
+
const resolved = await apiJson(getToken, baseUrl, "GET", "/v1/fields/resolve", {
|
|
2344
|
+
params: { name: args.name, follow_redirects: true }
|
|
2345
|
+
});
|
|
2346
|
+
return {
|
|
2347
|
+
id: resolved.field.id,
|
|
2348
|
+
resolution: { matched_by: resolved.matched_by, redirected_from: resolved.redirected_from }
|
|
2349
|
+
};
|
|
2350
|
+
}
|
|
2351
|
+
var LIST_DESCRIPTION = [
|
|
2352
|
+
"List the workspace's Field Registry \u2014 the canonical concepts Talonic has discovered across every ingested document, each with a stable id, maturity level, data type, synonyms and occurrence count.",
|
|
2353
|
+
"",
|
|
2354
|
+
"USE WHEN: you need to know WHAT data exists before querying it, want to pick the right concept for a question, or need the exact field id for talonic_get_field / talonic_field_values.",
|
|
2355
|
+
"NOT FOR: locating a specific document (talonic_search) or filtering documents by a value (talonic_filter).",
|
|
2356
|
+
"",
|
|
2357
|
+
"ARGS: `search` (case-insensitive contains on name), `maturity` (core | proven | candidate \u2014 prefer `core`/`proven` for anything you will build on), `include_superseded` (default false: rows merged into another concept are hidden so you never see two ids for one concept), `limit`, `cursor`.",
|
|
2358
|
+
"RETURNS: data[] of { id, canonical_name, display_name, data_type, maturity, tier, synonyms, description, occurrence_count, superseded_by, links } plus cursor pagination."
|
|
2359
|
+
].join("\n");
|
|
2360
|
+
var listFieldsInputSchema = {
|
|
2361
|
+
search: z.string().optional().describe("Case-insensitive contains match on canonical_name / display_name."),
|
|
2362
|
+
maturity: maturityArg,
|
|
2363
|
+
include_superseded: z.boolean().optional().describe("Include rows merged into a survivor (they carry `superseded_by`). Default false."),
|
|
2364
|
+
limit: z.number().int().min(1).max(100).optional().describe("Page size (default 20, max 100)."),
|
|
2365
|
+
cursor: z.string().optional().describe("Opaque cursor from pagination.next_cursor.")
|
|
2366
|
+
};
|
|
2367
|
+
async function handleListFields(getToken, baseUrl, args) {
|
|
2368
|
+
return runTool(
|
|
2369
|
+
() => apiJson(getToken, baseUrl, "GET", "/v1/fields", {
|
|
2370
|
+
params: {
|
|
2371
|
+
search: args.search,
|
|
2372
|
+
maturity: args.maturity,
|
|
2373
|
+
include_superseded: args.include_superseded,
|
|
2374
|
+
limit: args.limit,
|
|
2375
|
+
cursor: args.cursor
|
|
2376
|
+
}
|
|
2377
|
+
})
|
|
2378
|
+
);
|
|
2379
|
+
}
|
|
2380
|
+
var GET_DESCRIPTION = [
|
|
2381
|
+
"Get the CONCEPT CARD for one Field Registry field: what it means (curated description + extraction instruction), its synonyms and aliases, maturity, where it occurs (document/occurrence counts, first/last seen, document-type spread), its value distribution (top values with counts, distinct count, examples), schema usage, and identity links (superseded_by, absorbed concepts).",
|
|
2382
|
+
"",
|
|
2383
|
+
"USE WHEN: you must decide whether a field is the right concept for a question, need example values or the value shape before writing a filter, or hold a field NAME from the user and need the live concept behind it.",
|
|
2384
|
+
"NOT FOR: listing many fields (talonic_list_fields) or reading every value (talonic_field_values).",
|
|
2385
|
+
"",
|
|
2386
|
+
"ARGS: exactly one of `field_id` or `name`. Names are resolved through canonical name \u2192 spelling fold \u2192 merge aliases \u2192 synonyms (then case-insensitive fallbacks) and followed to the live concept; the response says which arm matched. `include_history: true` appends the curation trail (merges, renames, maturity moves).",
|
|
2387
|
+
"RETURNS: the card { id, canonical_name, maturity, data_type, definition, identity, occurrence, values, usage, links } plus `resolution` when a name was given and `history` when requested."
|
|
2388
|
+
].join("\n");
|
|
2389
|
+
var getFieldInputSchema = {
|
|
2390
|
+
field_id: fieldIdArg,
|
|
2391
|
+
name: fieldNameArg,
|
|
2392
|
+
include_history: z.boolean().optional().describe(
|
|
2393
|
+
"Append the concept's curation history (tier changes, merges, renames), newest first."
|
|
2394
|
+
)
|
|
2395
|
+
};
|
|
2396
|
+
async function handleGetField(getToken, baseUrl, args) {
|
|
2397
|
+
if (!args.field_id && !args.name) return validationError("Provide `field_id` or `name`.");
|
|
2398
|
+
if (args.field_id && args.name)
|
|
2399
|
+
return validationError("Provide either `field_id` or `name`, not both.");
|
|
2400
|
+
return runTool(async () => {
|
|
2401
|
+
const { id, resolution } = await resolveFieldId(getToken, baseUrl, args);
|
|
2402
|
+
const card = await apiJson(
|
|
2403
|
+
getToken,
|
|
2404
|
+
baseUrl,
|
|
2405
|
+
"GET",
|
|
2406
|
+
`/v1/fields/${id}/card`,
|
|
2407
|
+
{
|
|
2408
|
+
params: { follow_redirects: true }
|
|
2409
|
+
}
|
|
2410
|
+
);
|
|
2411
|
+
const out = { ...card };
|
|
2412
|
+
if (resolution) out["resolution"] = resolution;
|
|
2413
|
+
if (args.include_history) {
|
|
2414
|
+
out["history"] = await apiJson(getToken, baseUrl, "GET", `/v1/fields/${id}/history`, {
|
|
2415
|
+
params: { limit: 50 }
|
|
2416
|
+
});
|
|
2417
|
+
}
|
|
2418
|
+
return out;
|
|
2419
|
+
});
|
|
2420
|
+
}
|
|
2421
|
+
var VALUES_DESCRIPTION = [
|
|
2422
|
+
"Read a field's CURRENT VALUES across documents, with provenance \u2014 one row per bound occurrence: document id + filename + type, the value, confidence, the raw name it was captured under, the verbatim source text, and the resolution band that bound it.",
|
|
2423
|
+
"",
|
|
2424
|
+
"USE WHEN: the user asks 'what are all the X across my documents', you need to tabulate or aggregate one concept across the corpus, or you want the evidence (source text + document) behind a value.",
|
|
2425
|
+
"NOT FOR: multi-field row-shaped queries over documents (talonic_filter) or one document's full field set (talonic_get_document).",
|
|
2426
|
+
"",
|
|
2427
|
+
"ARGS: exactly one of `field_id` or `name`; optional `document_id` (one document), `value` (case-insensitive contains filter), `limit` (max 100), `cursor`.",
|
|
2428
|
+
"RETURNS: { field_id, canonical_name, concept_ids, data[] of { occurrence_id, document_id, document_filename, value, confidence, provenance{ raw_field_name, source_text, resolved_by, needs_confirmation, via_redirect }, links }, pagination }. Rows are Sources-IAM filtered for the caller."
|
|
2429
|
+
].join("\n");
|
|
2430
|
+
var fieldValuesInputSchema = {
|
|
2431
|
+
field_id: fieldIdArg,
|
|
2432
|
+
name: fieldNameArg,
|
|
2433
|
+
document_id: z.string().uuid().optional().describe("Only occurrences on this document."),
|
|
2434
|
+
value: z.string().optional().describe("Case-insensitive contains filter on the value text."),
|
|
2435
|
+
limit: z.number().int().min(1).max(100).optional().describe("Page size (default 20, max 100)."),
|
|
2436
|
+
cursor: z.string().optional().describe("Opaque cursor from pagination.next_cursor.")
|
|
2437
|
+
};
|
|
2438
|
+
async function handleFieldValues(getToken, baseUrl, args) {
|
|
2439
|
+
if (!args.field_id && !args.name) return validationError("Provide `field_id` or `name`.");
|
|
2440
|
+
if (args.field_id && args.name)
|
|
2441
|
+
return validationError("Provide either `field_id` or `name`, not both.");
|
|
2442
|
+
return runTool(async () => {
|
|
2443
|
+
const { id, resolution } = await resolveFieldId(getToken, baseUrl, args);
|
|
2444
|
+
const params = {
|
|
2445
|
+
document_id: args.document_id,
|
|
2446
|
+
value: args.value,
|
|
2447
|
+
limit: args.limit,
|
|
2448
|
+
cursor: args.cursor
|
|
2449
|
+
};
|
|
2450
|
+
const page = await apiJson(
|
|
2451
|
+
getToken,
|
|
2452
|
+
baseUrl,
|
|
2453
|
+
"GET",
|
|
2454
|
+
`/v1/fields/${id}/values`,
|
|
2455
|
+
{ params }
|
|
2456
|
+
);
|
|
2457
|
+
return resolution ? { ...page, resolution } : page;
|
|
2458
|
+
});
|
|
2459
|
+
}
|
|
2460
|
+
function registerFieldTools(server, getToken, baseUrl) {
|
|
2461
|
+
server.registerTool(
|
|
2462
|
+
"talonic_list_fields",
|
|
2463
|
+
{
|
|
2464
|
+
title: "List registry fields",
|
|
2465
|
+
description: LIST_DESCRIPTION,
|
|
2466
|
+
inputSchema: listFieldsInputSchema,
|
|
2467
|
+
annotations: {
|
|
2468
|
+
readOnlyHint: true,
|
|
2469
|
+
destructiveHint: false,
|
|
2470
|
+
idempotentHint: true,
|
|
2471
|
+
openWorldHint: false
|
|
2472
|
+
}
|
|
2473
|
+
},
|
|
2474
|
+
async (args) => handleListFields(getToken, baseUrl, args)
|
|
2475
|
+
);
|
|
2476
|
+
server.registerTool(
|
|
2477
|
+
"talonic_get_field",
|
|
2478
|
+
{
|
|
2479
|
+
title: "Get a field's concept card",
|
|
2480
|
+
description: GET_DESCRIPTION,
|
|
2481
|
+
inputSchema: getFieldInputSchema,
|
|
2482
|
+
annotations: {
|
|
2483
|
+
readOnlyHint: true,
|
|
2484
|
+
destructiveHint: false,
|
|
2485
|
+
idempotentHint: true,
|
|
2486
|
+
openWorldHint: false
|
|
2487
|
+
}
|
|
2488
|
+
},
|
|
2489
|
+
async (args) => handleGetField(getToken, baseUrl, args)
|
|
2490
|
+
);
|
|
2491
|
+
server.registerTool(
|
|
2492
|
+
"talonic_field_values",
|
|
2493
|
+
{
|
|
2494
|
+
title: "Read a field's values across documents",
|
|
2495
|
+
description: VALUES_DESCRIPTION,
|
|
2496
|
+
inputSchema: fieldValuesInputSchema,
|
|
2497
|
+
annotations: {
|
|
2498
|
+
readOnlyHint: true,
|
|
2499
|
+
destructiveHint: false,
|
|
2500
|
+
idempotentHint: true,
|
|
2501
|
+
openWorldHint: false
|
|
2502
|
+
}
|
|
2503
|
+
},
|
|
2504
|
+
async (args) => handleFieldValues(getToken, baseUrl, args)
|
|
2505
|
+
);
|
|
2506
|
+
}
|
|
2507
|
+
function unwrap(res) {
|
|
2508
|
+
let result = res.content;
|
|
2509
|
+
if (typeof res.content === "string") {
|
|
2510
|
+
try {
|
|
2511
|
+
result = JSON.parse(res.content);
|
|
2512
|
+
} catch {
|
|
2513
|
+
result = res.content;
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
const out = { tool: res.tool, result };
|
|
2517
|
+
if (res.citations?.length) out["citations"] = res.citations;
|
|
2518
|
+
if (res.artifacts?.length) out["artifacts"] = res.artifacts;
|
|
2519
|
+
if (res.cards?.length) out["cards"] = res.cards;
|
|
2520
|
+
return out;
|
|
2521
|
+
}
|
|
2522
|
+
var documentIdsArg = z.array(z.string().uuid()).max(1e3).optional().describe("Restrict to these document ids (hard filter, enforced server-side).");
|
|
2523
|
+
var FIND_DESCRIPTION = [
|
|
2524
|
+
"Locate the REAL data behind a natural-language concept before querying anything: semantic + lexical retrieval that resolves a phrase ('payment volume per transaction', 'counterparty', 'Vertragslaufzeit') to the registry fields, values, documents and text passages that carry it \u2014 even when the field is captured under a different name.",
|
|
2525
|
+
"",
|
|
2526
|
+
"USE WHEN: the user asks about a concept and you are not sure which field holds it, when talonic_list_fields / talonic_search came back empty or ambiguous, or when the answer may live in document prose rather than a captured cell.",
|
|
2527
|
+
"NOT FOR: reading a known field's values (talonic_field_values) or filtering by a known field (talonic_filter).",
|
|
2528
|
+
"",
|
|
2529
|
+
"ARGS: `query` (the concept, in the user's words), optional `top_k` (1\u201325, default 10), `document_ids` (hard scope).",
|
|
2530
|
+
"RETURNS: ranked planes \u2014 FIELDS (canonical_name, field ids/keys, maturity/tier, occurrence_count, sample values with their documents), VALUES, DOCUMENTS and PASSAGES \u2014 every item a ready handle for the next call. Read-only, no LLM cost."
|
|
2531
|
+
].join("\n");
|
|
2532
|
+
var findDataInputSchema = {
|
|
2533
|
+
query: z.string().min(1).describe("The natural-language concept to locate."),
|
|
2534
|
+
top_k: z.number().int().min(1).max(25).optional().describe("Max results per plane (default 10)."),
|
|
2535
|
+
document_ids: documentIdsArg
|
|
2536
|
+
};
|
|
2537
|
+
async function handleFindData(getToken, baseUrl, args) {
|
|
2538
|
+
return runTool(async () => {
|
|
2539
|
+
const res = await apiJson(
|
|
2540
|
+
getToken,
|
|
2541
|
+
baseUrl,
|
|
2542
|
+
"POST",
|
|
2543
|
+
"/v1/agent/tools/find_data/invoke",
|
|
2544
|
+
{
|
|
2545
|
+
body: {
|
|
2546
|
+
args: {
|
|
2547
|
+
query: args.query,
|
|
2548
|
+
...args.top_k !== void 0 ? { top_k: args.top_k } : {},
|
|
2549
|
+
...args.document_ids?.length ? { document_scope: args.document_ids } : {}
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
}
|
|
2553
|
+
);
|
|
2554
|
+
return unwrap(res);
|
|
2555
|
+
});
|
|
2556
|
+
}
|
|
2557
|
+
var LIST_TOOLS_DESCRIPTION = [
|
|
2558
|
+
"List the platform's agent tool registry \u2014 every retrieval, provenance and analysis primitive the in-product Talonic agent runs on (find_data, describe_data, query_data for read-only SQL over the extracted data, get_document_markdown, workspace_overview, \u2026) with its input schema and whether THIS credential may invoke it.",
|
|
2559
|
+
"",
|
|
2560
|
+
"USE WHEN: you want a capability talonic_* tools do not cover directly (e.g. SQL over the structured data, a workspace overview, cohort discovery) \u2014 list here, then call talonic_invoke_agent_tool with the tool name and its args.",
|
|
2561
|
+
"NOT FOR: discovering fields (talonic_list_fields / talonic_find_data) or documents (talonic_search) \u2014 those are shaped for you.",
|
|
2562
|
+
"",
|
|
2563
|
+
"ARGS: `only_invocable` (default true \u2014 hide tools this key cannot run), `include_schemas` (default true \u2014 include each tool's JSON input schema).",
|
|
2564
|
+
"RETURNS: { tools[] of { name, description, impact, capability, can_invoke, input_schema? }, invocable_count, totalCount }."
|
|
2565
|
+
].join("\n");
|
|
2566
|
+
var listAgentToolsInputSchema = {
|
|
2567
|
+
only_invocable: z.boolean().optional().describe("Hide tools this credential cannot invoke. Default true."),
|
|
2568
|
+
include_schemas: z.boolean().optional().describe("Include each tool's JSON input schema. Default true.")
|
|
2569
|
+
};
|
|
2570
|
+
async function handleListAgentTools(getToken, baseUrl, args) {
|
|
2571
|
+
return runTool(async () => {
|
|
2572
|
+
const res = await apiJson(getToken, baseUrl, "GET", "/v1/agent/tools");
|
|
2573
|
+
const onlyInvocable = args.only_invocable ?? true;
|
|
2574
|
+
const includeSchemas = args.include_schemas ?? true;
|
|
2575
|
+
const tools = (res.tools ?? []).filter((t) => !onlyInvocable || t.can_invoke).map((t) => {
|
|
2576
|
+
const item = {
|
|
2577
|
+
name: t.name,
|
|
2578
|
+
description: t.description,
|
|
2579
|
+
impact: t.impact,
|
|
2580
|
+
capability: t.capability,
|
|
2581
|
+
can_invoke: t.can_invoke
|
|
2582
|
+
};
|
|
2583
|
+
if (includeSchemas) item["input_schema"] = t.input_schema;
|
|
2584
|
+
return item;
|
|
2585
|
+
});
|
|
2586
|
+
return {
|
|
2587
|
+
tools,
|
|
2588
|
+
invocable_count: res.invocable_count ?? tools.length,
|
|
2589
|
+
totalCount: res.totalCount ?? res.tools?.length ?? 0
|
|
2590
|
+
};
|
|
2591
|
+
});
|
|
2592
|
+
}
|
|
2593
|
+
var INVOKE_DESCRIPTION = [
|
|
2594
|
+
"Invoke ONE named tool from the platform's agent tool registry directly, with no model in the loop \u2014 you choose the arguments. This is how an external agent uses Talonic's retrieval and provenance while driving control flow itself (e.g. `query_data` for a read-only SQL SELECT over the extracted data, `describe_data` for the queryable field list, `get_document_markdown` to read a document's text).",
|
|
2595
|
+
"",
|
|
2596
|
+
"USE WHEN: talonic_list_agent_tools showed a tool with can_invoke: true that does what you need. Pass exactly the `args` its input_schema declares.",
|
|
2597
|
+
"NOT FOR: anything a dedicated talonic_* tool already does (prefer those \u2014 they are shaped for you).",
|
|
2598
|
+
"",
|
|
2599
|
+
"ARGS: `name` (tool name), `args` (object matching the tool's input_schema), optional `document_ids` (hard scope for scope-aware tools).",
|
|
2600
|
+
"RETURNS: { tool, result (the tool's parsed output), citations?, artifacts?, cards? }. Denied capabilities come back as an error naming the capability required; the platform re-checks every call."
|
|
2601
|
+
].join("\n");
|
|
2602
|
+
var invokeAgentToolInputSchema = {
|
|
2603
|
+
name: z.string().min(1).describe("Tool name from talonic_list_agent_tools, e.g. `query_data`."),
|
|
2604
|
+
args: z.record(z.string(), z.unknown()).optional().describe("Arguments matching the tool's input_schema."),
|
|
2605
|
+
document_ids: documentIdsArg
|
|
2606
|
+
};
|
|
2607
|
+
async function handleInvokeAgentTool(getToken, baseUrl, args) {
|
|
2608
|
+
return runTool(async () => {
|
|
2609
|
+
const res = await apiJson(
|
|
2610
|
+
getToken,
|
|
2611
|
+
baseUrl,
|
|
2612
|
+
"POST",
|
|
2613
|
+
`/v1/agent/tools/${encodeURIComponent(args.name)}/invoke`,
|
|
2614
|
+
{
|
|
2615
|
+
body: {
|
|
2616
|
+
args: args.args ?? {},
|
|
2617
|
+
...args.document_ids?.length ? { scope: { document_ids: args.document_ids } } : {}
|
|
2618
|
+
}
|
|
2619
|
+
}
|
|
2620
|
+
);
|
|
2621
|
+
return unwrap(res);
|
|
2622
|
+
});
|
|
2623
|
+
}
|
|
2624
|
+
function registerAgentRegistryTools(server, getToken, baseUrl) {
|
|
2625
|
+
server.registerTool(
|
|
2626
|
+
"talonic_find_data",
|
|
2627
|
+
{
|
|
2628
|
+
title: "Find the data behind a concept",
|
|
2629
|
+
description: FIND_DESCRIPTION,
|
|
2630
|
+
inputSchema: findDataInputSchema,
|
|
2631
|
+
annotations: {
|
|
2632
|
+
readOnlyHint: true,
|
|
2633
|
+
destructiveHint: false,
|
|
2634
|
+
idempotentHint: true,
|
|
2635
|
+
openWorldHint: false
|
|
2636
|
+
}
|
|
2637
|
+
},
|
|
2638
|
+
async (args) => handleFindData(getToken, baseUrl, args)
|
|
2639
|
+
);
|
|
2640
|
+
server.registerTool(
|
|
2641
|
+
"talonic_list_agent_tools",
|
|
2642
|
+
{
|
|
2643
|
+
title: "List the platform agent tools",
|
|
2644
|
+
description: LIST_TOOLS_DESCRIPTION,
|
|
2645
|
+
inputSchema: listAgentToolsInputSchema,
|
|
2646
|
+
annotations: {
|
|
2647
|
+
readOnlyHint: true,
|
|
2648
|
+
destructiveHint: false,
|
|
2649
|
+
idempotentHint: true,
|
|
2650
|
+
openWorldHint: false
|
|
2651
|
+
}
|
|
2652
|
+
},
|
|
2653
|
+
async (args) => handleListAgentTools(getToken, baseUrl, args)
|
|
2654
|
+
);
|
|
2655
|
+
server.registerTool(
|
|
2656
|
+
"talonic_invoke_agent_tool",
|
|
2657
|
+
{
|
|
2658
|
+
title: "Invoke a platform agent tool",
|
|
2659
|
+
description: INVOKE_DESCRIPTION,
|
|
2660
|
+
inputSchema: invokeAgentToolInputSchema,
|
|
2661
|
+
annotations: {
|
|
2662
|
+
readOnlyHint: true,
|
|
2663
|
+
destructiveHint: false,
|
|
2664
|
+
idempotentHint: false,
|
|
2665
|
+
openWorldHint: false
|
|
2666
|
+
}
|
|
2667
|
+
},
|
|
2668
|
+
async (args) => handleInvokeAgentTool(getToken, baseUrl, args)
|
|
2669
|
+
);
|
|
2670
|
+
}
|
|
2671
|
+
|
|
2297
2672
|
// package.json
|
|
2298
2673
|
var package_default = {
|
|
2299
|
-
version: "0.1.
|
|
2674
|
+
version: "0.1.76"};
|
|
2300
2675
|
|
|
2301
2676
|
// src/version.ts
|
|
2302
2677
|
var VERSION = package_default.version;
|
|
@@ -2388,6 +2763,12 @@ function createServer(options) {
|
|
|
2388
2763
|
"with that id \u2014 do not ask the user for an id.",
|
|
2389
2764
|
"talonic_search matches LITERAL keywords: query with one short singular term or an",
|
|
2390
2765
|
"exact filename, never a sentence; on an empty result retry with a shorter keyword.",
|
|
2766
|
+
"The Field Registry is the source of truth for WHAT data exists: talonic_find_data",
|
|
2767
|
+
"resolves a concept in the user's words to the fields/documents that carry it,",
|
|
2768
|
+
"talonic_list_fields / talonic_get_field describe concepts (prefer maturity core or",
|
|
2769
|
+
"proven for anything you build on), talonic_field_values reads one concept across all",
|
|
2770
|
+
"documents with provenance. Anything else the in-product agent can do is reachable via",
|
|
2771
|
+
"talonic_list_agent_tools + talonic_invoke_agent_tool (e.g. query_data for SQL).",
|
|
2391
2772
|
"For Agent-stage work, follow list -> get -> claim -> heartbeat while needed ->",
|
|
2392
2773
|
"submit. Preserve the execution_epoch from claim and return only fields declared",
|
|
2393
2774
|
"in the task output_contract; never continue after a lease or epoch conflict.",
|
|
@@ -2414,6 +2795,8 @@ function createServer(options) {
|
|
|
2414
2795
|
registerGetPricing(server, getTalonic);
|
|
2415
2796
|
registerGetUsage(server, getTalonic);
|
|
2416
2797
|
registerRequestUpload(server, getToken, baseUrl);
|
|
2798
|
+
registerFieldTools(server, getToken, baseUrl);
|
|
2799
|
+
registerAgentRegistryTools(server, getToken, baseUrl);
|
|
2417
2800
|
registerAgentTaskTools(server, getToken, baseUrl);
|
|
2418
2801
|
if (options.includeGrowthTools) {
|
|
2419
2802
|
registerGrowthTools(server, getToken, baseUrl);
|