MCP: instructions для Claude (что у нас на сегодня -> очередь бухгалтерии) и промпт today; текст в p-mcp-instructions.md
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -275,6 +275,12 @@ d("MCP бухгалтерии (временная БД)", () => {
|
||||
expect(tl.find((t) => t.name === "acc_review_done")?.annotations?.readOnlyHint).toBe(false);
|
||||
expect(tl.find((t) => t.name === "acc_review_list")?._meta?.ui?.resourceUri).toBe("ui://accounting_automation/review-table");
|
||||
expect(i.json().result.capabilities.resources).toBeDefined();
|
||||
expect(i.json().result.instructions).toContain("acc_review_list");
|
||||
const pr = (await post(bearer(TOKEN_A), rpc("prompts/list"))).json();
|
||||
expect(pr.result.prompts[0].name).toBe("today");
|
||||
expect((await post(bearer(TOKEN_A), rpc("prompts/get", { name: "today" }))).json().result.messages[0].content.text).toContain("acc_review_list");
|
||||
const custom = (await post(bearer(TOKEN_A), rpc("initialize", {}), { instructions: "СВОИ ИНСТРУКЦИИ" })).json();
|
||||
expect(custom.result.instructions).toBe("СВОИ ИНСТРУКЦИИ");
|
||||
expect((await post(bearer(TOKEN_A), rpc("nope"))).json().error.code).toBe(-32601);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user