From 09aaff4a9f0ca6e007f5b372fd188f99b6112333 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 00:25:58 +0000 Subject: [PATCH 1/7] feat(mcp): a skill can opt out of MCP prompt projection with mcpPrompt: false Claude-Session: https://claude.ai/code/session_01L9qiby4dRyeuWrpDd4sZKx Co-Authored-By: Claude --- packages/mcp/src/skill-prompts.test.ts | 125 +++++++++++++++++++++++++ packages/mcp/src/skill-prompts.ts | 15 +++ packages/spec/src/ai/skill.form.ts | 1 + packages/spec/src/ai/skill.zod.ts | 36 ++++++- 4 files changed, 174 insertions(+), 3 deletions(-) diff --git a/packages/mcp/src/skill-prompts.test.ts b/packages/mcp/src/skill-prompts.test.ts index d37c9561686..1a019c8b0b2 100644 --- a/packages/mcp/src/skill-prompts.test.ts +++ b/packages/mcp/src/skill-prompts.test.ts @@ -1,6 +1,8 @@ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license. import { describe, it, expect } from 'vitest'; +import { Client } from '@modelcontextprotocol/sdk/client/index.js'; +import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js'; import { MCP_OAUTH_SCOPE_ACTIONS, @@ -438,3 +440,126 @@ describe('a skill is offered only where the connection serves the tools it binds expect(skillBindingServed({ name: 'free_text' }, new Set())).toBe(true); }); }); + +/** + * [#34167] The binding test above answers whether a connection CAN run a + * playbook; it cannot answer whether the playbook is written for MCP. A skill + * can bind tools MCP serves under the same names and still teach the + * in-product agent loop (its tools, its approval card). Its owner opts it out + * with `mcpPrompt: false`: never listed, unknown to `prompts/get`, on every + * connection, whatever its binding. Driven through both doors that project + * skills: the per-request HTTP server (`registerSkillPrompts`) and the + * long-lived stdio server (`MCPServerRuntime.bridgePrompts`). + */ +describe('a skill its owner declares in-product only is never an MCP prompt (#34167)', () => { + // The card's measured rows: one binds two tools the data door serves by + // name, the other the `action_` family `run_action` serves. + const RECORD_WRITING = { + name: 'record_writing', + label: 'Record Writing', + instructions: 'Open the record with open_record, then the user confirms on a card.', + tools: ['create_record', 'update_record'], + }; + const ACTIONS_EXECUTOR = { + name: 'actions_executor', + label: 'Actions Executor', + instructions: 'Call the action_ tools; fall back on the confirm card.', + tools: ['action_*'], + }; + const inProductOnly = (skill: T) => ({ ...skill, mcpPrompt: false }); + + const DATA_WRITE: RpcConnection = { grantedScopes: [MCP_OAUTH_SCOPE_DATA_READ, MCP_OAUTH_SCOPE_DATA_WRITE] }; + const ACTIONS: RpcConnection = { grantedScopes: [MCP_OAUTH_SCOPE_DATA_READ, MCP_OAUTH_SCOPE_ACTIONS] }; + const EVERY: RpcConnection = { + grantedScopes: [MCP_OAUTH_SCOPE_DATA_READ, MCP_OAUTH_SCOPE_DATA_WRITE, MCP_OAUTH_SCOPE_ACTIONS], + }; + + const listed = async (rows: unknown[], connection: RpcConnection): Promise => { + const json = await rpc(withSkills(rows), 'prompts/list', undefined, connection); + expect(json.error).toBeUndefined(); + return json.result.prompts.map((p: any) => p.name); + }; + const servedTools = async (connection: RpcConnection): Promise => { + const json = await rpc(withSkills([]), 'tools/list', undefined, connection); + return json.result.tools.map((t: any) => t.name); + }; + + it('CONTROL (the card\'s reproduction): undeclared, both rows pass the binding test and are listed', async () => { + expect(await servedTools(DATA_WRITE)).toEqual(expect.arrayContaining(['create_record', 'update_record'])); + expect(await servedTools(ACTIONS)).toContain('run_action'); + expect(await listed([RECORD_WRITING], DATA_WRITE)).toEqual(['record_writing']); + expect(await listed([ACTIONS_EXECUTOR], ACTIONS)).toEqual(['actions_executor']); + }); + + it('declared in-product only, record_writing is not listed on a data:write connection that serves both its tools', async () => { + expect(await listed([inProductOnly(RECORD_WRITING)], DATA_WRITE)).toEqual([]); + expect(await listed([inProductOnly(RECORD_WRITING)], EVERY)).toEqual([]); + }); + + it('declared in-product only, actions_executor is not listed on a connection that serves run_action', async () => { + expect(await listed([inProductOnly(ACTIONS_EXECUTOR)], ACTIONS)).toEqual([]); + expect(await listed([inProductOnly(ACTIONS_EXECUTOR)], EVERY)).toEqual([]); + }); + + it('prompts/get answers a declared skill exactly as it answers an unknown name', async () => { + const rows = [inProductOnly(RECORD_WRITING)]; + const declared = await rpc(withSkills(rows), 'prompts/get', { name: 'record_writing' }, EVERY); + const unknown = await rpc(withSkills(rows), 'prompts/get', { name: 'no_such_skill' }, EVERY); + expect(declared.result).toBeUndefined(); + expect(declared.error.code).toBe(-32602); + expect(declared.error.data).toBeUndefined(); + expect(declared.error.message).toBe(unknown.error.message.replace('no_such_skill', 'record_writing')); + }); + + it('CONTROL: mcpPrompt true projects exactly as an undeclared skill, beside a declared one', async () => { + const rows = [{ ...RECORD_WRITING, mcpPrompt: true }, inProductOnly(ACTIONS_EXECUTOR), { ...ACTIONS_EXECUTOR, name: 'mcp_actions' }]; + expect(await listed(rows, EVERY)).toEqual(['record_writing', 'mcp_actions']); + const json = await rpc(withSkills(rows), 'prompts/get', { name: 'record_writing' }, EVERY); + expect(json.result.messages[0].content.text).toBe(RECORD_WRITING.instructions); + expect(projectSkillPrompt(inProductOnly(RECORD_WRITING))).toBeNull(); + expect(projectSkillPrompt({ ...RECORD_WRITING, mcpPrompt: true })).toEqual(projectSkillPrompt(RECORD_WRITING)); + }); + + describe('the long-lived stdio server (bridgePrompts), which applies no binding filter', () => { + // Its binding names a tool no MCP family serves, so a hidden skill here + // cannot be the binding filter's doing: bridgePrompts has none. + const OPEN_RECORD = { + name: 'record_opening', + label: 'Record Opening', + instructions: 'Call open_record and wait for the card.', + tools: ['open_record'], + }; + + const stdioPrompts = async (rows: unknown[]) => { + const metadataService = { list: async (type: string) => (type === 'skill' ? rows : []) }; + const runtime = new MCPServerRuntime({ name: 'skill-prompts-stdio', version: '0.0.0' }); + await runtime.bridgePrompts(metadataService as never); + const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair(); + const client = new Client({ name: 'test-client', version: '0.0.0' }); + await Promise.all([runtime.server.connect(serverTransport), client.connect(clientTransport)]); + return { + client, + names: (await client.listPrompts()).prompts.map((p) => p.name), + close: async () => { + await client.close(); + await runtime.stop().catch(() => {}); + }, + }; + }; + + it('CONTROL: undeclared, a skill binding a tool nothing serves is still listed and got', async () => { + const stdio = await stdioPrompts([OPEN_RECORD]); + expect(stdio.names).toEqual(['record_opening']); + const got = await stdio.client.getPrompt({ name: 'record_opening' }); + expect(got.messages[0].content).toEqual({ type: 'text', text: OPEN_RECORD.instructions }); + await stdio.close(); + }); + + it('declared in-product only, the same skill is neither listed nor got', async () => { + const stdio = await stdioPrompts([inProductOnly(OPEN_RECORD), inProductOnly(RECORD_WRITING)]); + expect(stdio.names).toEqual([]); + await expect(stdio.client.getPrompt({ name: 'record_opening' })).rejects.toMatchObject({ code: -32602 }); + await stdio.close(); + }); + }); +}); diff --git a/packages/mcp/src/skill-prompts.ts b/packages/mcp/src/skill-prompts.ts index ae3096cc994..f2ceb1ef77a 100644 --- a/packages/mcp/src/skill-prompts.ts +++ b/packages/mcp/src/skill-prompts.ts @@ -34,6 +34,17 @@ * The projection is **narrow on purpose**: a skill with no `instructions` has * nothing to serve, so it is not listed at all rather than listed empty. * + * ## The owner decides whether a skill is written for MCP at all (#34167) + * + * The binding test below answers whether a connection CAN run a playbook. It + * cannot answer whether the playbook is written for MCP: a skill may bind + * tools MCP serves under the same names (`create_record`, `action_*` through + * `run_action`) and still tell the model to call in-product tools and wait for + * the in-product approval card. Its owner says so with `mcpPrompt: false`, and + * {@link projectSkillPrompt} — the one place both the per-request HTTP surface + * and the long-lived stdio server read — projects no such skill, on any + * connection, whatever its binding. + * * ## The binding still decides WHETHER a skill is offered (#32767) * * The binding is not projected, but it is read: a skill's instructions teach @@ -126,6 +137,8 @@ function readString(source: Record, key: string): string | unde * - anything that is not an object with a non-empty string `name`; * - `active: false` — a disabled skill is not offered (the same rule the cloud * skill registry applies); + * - `mcpPrompt: false` — the owner declared the skill written for the + * in-product agents only (#34167); no tool binding brings it back; * - no `instructions` (or blank) — the half that projects is missing, so there * is no prompt to serve. The skill is still perfectly valid metadata; it just * has nothing for an MCP client to fetch. @@ -140,6 +153,8 @@ export function projectSkillPrompt( const name = readString(record, 'name'); if (!name) return null; if (record.active === false) return null; + // [#34167] The owner's opt-out of MCP projection: in-product only. + if (record.mcpPrompt === false) return null; const instructions = readString(record, 'instructions'); if (!instructions) return null; diff --git a/packages/spec/src/ai/skill.form.ts b/packages/spec/src/ai/skill.form.ts index 4bbd92086c0..f99c6ca3d9f 100644 --- a/packages/spec/src/ai/skill.form.ts +++ b/packages/spec/src/ai/skill.form.ts @@ -37,6 +37,7 @@ export const skillForm = defineForm({ fields: [ { field: 'instructions', widget: 'textarea', helpText: 'Instructions for AI — tell it how to use these tools together' }, { field: 'tools', widget: 'string-tags', required: true, helpText: 'Tool names (supports wildcard: action_*)' }, + { field: 'mcpPrompt', colSpan: 1, helpText: 'Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered.' }, ], }, { diff --git a/packages/spec/src/ai/skill.zod.ts b/packages/spec/src/ai/skill.zod.ts index 42bf9715d20..12d51f63f31 100644 --- a/packages/spec/src/ai/skill.zod.ts +++ b/packages/spec/src/ai/skill.zod.ts @@ -230,6 +230,8 @@ export type SkillTriggerCondition = z.input; * `prompts/list` / `prompts/get` a skill authored in the open framework. * Where `registerSkillPrompts` installs that prompt surface, the skill is * offered only on a server that serves every tool it binds (see `tools`). + * A skill whose owner sets `mcpPrompt: false` is written for the in-product + * agents only and is never projected (see `mcpPrompt`). * - **`tools`** — **bound** by the cloud runtime, **read** by MCP. The * in-product `ask` / `build` agent runtime, which ships in the cloud / * Enterprise distribution, composes an agent's tool set from it. In the open @@ -346,9 +348,10 @@ export const SkillSchema = lazySchema(() => strictObject({ * primitive, so a connected client can list this skill by name and fetch this * text, on a server that serves the tools the skill binds (see `tools`). A * skill with no `instructions` has nothing to project and is not listed as a - * prompt at all. + * prompt at all. Instructions written for the in-product agents only (their + * tools, their approval card) opt out with `mcpPrompt: false`. */ - instructions: z.string().optional().describe('LLM instructions when skill is active — also served as an MCP prompt'), + instructions: z.string().optional().describe('LLM instructions when skill is active — also served as an MCP prompt unless mcpPrompt is false'), /** * References to tool names that belong to this skill. @@ -389,6 +392,11 @@ export const SkillSchema = lazySchema(() => strictObject({ * through `list_actions` / `run_action`, never as `action_` tools. * - A skill that binds no tool is offered as before, and `prompts/get` * answers a withheld skill as it answers a prompt name no skill derives. + * - The binding answers whether a connection CAN run the playbook, not + * whether the playbook is written for MCP: a skill can bind tools MCP + * serves under the same names and still be written for the in-product + * agent loop. Its owner opts it out of MCP projection with + * `mcpPrompt: false`, which no binding overrides. * * That is the reach of `registerSkillPrompts`: `MCPServerRuntime`'s HTTP * door, and any host that drives its own `McpServer` and calls it, stdio @@ -400,7 +408,7 @@ export const SkillSchema = lazySchema(() => strictObject({ * registers that tool. The references are still checked at authoring time in * both distributions (`ai-skill-tool-unresolved`). */ - tools: z.array(z.string().regex(/^[a-z_][a-z0-9_]*\*?$/)).describe('Tool names belonging to this skill (supports trailing wildcard, e.g. `action_*`) — bound by the cloud agent runtime; an MCP server whose prompts `registerSkillPrompts` installs offers the skill only when it serves every tool named here (an `action_` entry also through `run_action`)'), + tools: z.array(z.string().regex(/^[a-z_][a-z0-9_]*\*?$/)).describe('Tool names belonging to this skill (supports trailing wildcard, e.g. `action_*`) — bound by the cloud agent runtime; an MCP server whose prompts `registerSkillPrompts` installs offers the skill only when it serves every tool named here (an `action_` entry also through `run_action`); `mcpPrompt: false` withholds it from MCP whatever this binding'), /** * Programmatic conditions for skill activation. @@ -418,6 +426,28 @@ export const SkillSchema = lazySchema(() => strictObject({ * MCP prompt (#3905). */ active: z.boolean().default(true).describe('Whether the skill is enabled'), + + /** + * Whether this skill is offered as an MCP prompt — the owner's opt-out of + * MCP projection. + * + * `false` declares the skill written for the **in-product** `ask` / `build` + * agents only: its instructions assume their tool set and their approval + * card, which an MCP client does not have. Such a skill is never listed by + * `prompts/list` and is answered by `prompts/get` as an unknown prompt name, + * on every MCP connection and whatever its `tools` binding — even on a + * connection that serves every tool it binds (`@objectstack/mcp` + * `projectSkillPrompt`, which both the per-request HTTP prompt surface and the + * long-lived stdio server read). + * + * Absent or `true`: offered as before, where the server serves the tools the + * skill binds (see `tools`). The key changes nothing else: the in-product + * agent runtime resolves, binds and activates the skill exactly as without + * it, and its `tools` / `surface` are validated as before. + */ + mcpPrompt: z.boolean().optional().describe( + 'Whether this skill is offered as an MCP prompt. false = written for the in-product agents only: never listed by prompts/list and unknown to prompts/get on any MCP connection, whatever its tools binding. Absent or true = offered where the server serves its tools', + ), /** * ADR-0010 §3.7 — Package-level protection envelope. Package * authors declare lock policy here, in a code package's source; From fd4bdcf6dbf274fa8da37ceca1bc1edf3963ae1d Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 00:31:17 +0000 Subject: [PATCH 2/7] feat(spec): document mcpPrompt, liveness row, docs and changeset Claude-Session: https://claude.ai/code/session_01L9qiby4dRyeuWrpDd4sZKx Co-Authored-By: Claude --- .changeset/34167-skill-mcp-opt-out.md | 17 ++++++++++++++ content/docs/ai/agents.mdx | 11 +++++++++- content/docs/ai/connect-mcp.mdx | 22 +++++++++++++++++++ .../src/validate-ai-surface-affinity.test.ts | 15 +++++++++++++ .../src/validate-ai-tool-references.test.ts | 17 ++++++++++++++ packages/mcp/src/skill-prompts.test.ts | 10 +++++++-- ...l.meta-types-degenerate-derivation.test.ts | 4 +++- packages/spec/authorable-surface/ai.json | 1 + packages/spec/liveness/skill.json | 7 ++++++ packages/spec/src/ai/skill.test.ts | 19 ++++++++++++++++ 10 files changed, 119 insertions(+), 4 deletions(-) create mode 100644 .changeset/34167-skill-mcp-opt-out.md diff --git a/.changeset/34167-skill-mcp-opt-out.md b/.changeset/34167-skill-mcp-opt-out.md new file mode 100644 index 00000000000..dcde06495f3 --- /dev/null +++ b/.changeset/34167-skill-mcp-opt-out.md @@ -0,0 +1,17 @@ +--- +'@objectstack/spec': minor +'@objectstack/mcp': minor +--- + +feat(spec, mcp): a skill written for the in-product agents only opts out of MCP prompt projection with `mcpPrompt: false` + +Clause-②: yes (widening) +Metadata-protocol: added + +`SkillSchema` gains an optional boolean, `mcpPrompt`. A skill that sets `mcpPrompt: false` is never offered as an MCP prompt: `prompts/list` leaves it out and `prompts/get` answers it exactly as it answers an unknown prompt name. This holds on every MCP connection, the per-request HTTP endpoint and the long-lived stdio server alike, and whatever the skill's `tools` binding, including on a connection that serves every tool it binds. + +The binding test (a skill is offered only where the connection serves every tool it binds) answers whether a connection can run a playbook. It cannot tell whether the playbook is written for MCP. A skill can bind tools MCP serves under the same names, such as `create_record` and `update_record`, or `action_*` through `run_action`, and still tell the model to call in-product tools and wait for the in-product approval card, which an MCP client does not have. The skill's owner now says so on the skill. + +A skill without the key, or with `mcpPrompt: true`, is offered exactly as before, and nothing parses differently: the key has no default. The key changes nothing on the in-product agent runtime, which resolves, binds and activates the skill as it did, and the authoring checks on `tools` and `surface` report the same findings. The skill form offers the key as a toggle in its Basics section. + +Nothing to migrate. diff --git a/content/docs/ai/agents.mdx b/content/docs/ai/agents.mdx index ca0412c0fae..f78d175e693 100644 --- a/content/docs/ai/agents.mdx +++ b/content/docs/ai/agents.mdx @@ -252,7 +252,7 @@ itself (a different LLM-facing description, fewer exposed parameters). | Half | Keys | Where it runs | |---|---|---| -| **Judgment** | `instructions` | **Both editions.** On the open framework `@objectstack/mcp` serves it as an MCP **prompt** — a connected client can `prompts/list` it by name and `prompts/get` the text ([Connect an MCP client](/docs/ai/connect-mcp#prompts-your-skills-served-to-the-client)), on a server that serves the tools the skill binds (below). On **ObjectOS** it is injected into the active agent's system prompt. | +| **Judgment** | `instructions`, `mcpPrompt` | **Both editions.** On the open framework `@objectstack/mcp` serves it as an MCP **prompt** — a connected client can `prompts/list` it by name and `prompts/get` the text ([Connect an MCP client](/docs/ai/connect-mcp#prompts-your-skills-served-to-the-client)), on a server that serves the tools the skill binds (below), unless the skill sets `mcpPrompt: false`. On **ObjectOS** it is injected into the active agent's system prompt. | | **Wiring** | `tools`, `surface`, `triggerConditions` | **Bound on ObjectOS only.** Composing an agent's tool set and deciding when a skill activates are properties of an in-product agent loop. Over MCP the model lives in the client and drives one flat tool list, and your AI-exposed Actions already reach it through `list_actions` / `run_action`. `surface` and `triggerConditions` are inert there; `tools` is read, and decides whether the skill is offered. | **Over MCP, `tools` decides whether the skill is offered.** The prompt surface @@ -270,6 +270,15 @@ applies no such filter. So bind a skill only to tools its intended connections serve: one that names a tool no MCP tool family serves is offered on no such connection unless a host registers that tool. +**A skill written only for the in-product agents opts out of MCP with +`mcpPrompt: false`.** Its instructions may assume the in-product tool set or +the in-product approval card even when every tool it binds is one MCP serves +too. With `mcpPrompt: false` the skill is never listed by `prompts/list` and is +unknown to `prompts/get`, on every MCP connection, stdio included, whatever its +`tools`. Absent or `true`, it is offered as described above. ObjectOS reads the +skill exactly as before: the key decides MCP projection and nothing else +([Connect an MCP client](/docs/ai/connect-mcp#prompts-your-skills-served-to-the-client)). + Both halves are still **validated everywhere** — a skill naming a tool that does not exist is an authoring error in either distribution. So a skill written against the open framework keeps its full meaning when the app runs on diff --git a/content/docs/ai/connect-mcp.mdx b/content/docs/ai/connect-mcp.mdx index 3b1a26d30d8..daa582d1a00 100644 --- a/content/docs/ai/connect-mcp.mdx +++ b/content/docs/ai/connect-mcp.mdx @@ -499,6 +499,28 @@ offered as before. When a prompt you expect is missing, connect with a grant that registers the skill's tools, or bind the skill only to tools its intended connections serve. +**A skill written for the in-product agents opts out.** The binding answers +whether a connection *can* run a playbook, not whether the playbook is written +for MCP: a skill can bind tools MCP serves under the same names +(`create_record`, `action_*` through `run_action`) and still tell the model to +call in-product tools or wait for the in-product approval card. Set +`mcpPrompt: false` on such a skill and it is never offered as a prompt: +`prompts/list` leaves it out and `prompts/get` answers it as an unknown prompt +name, on every connection (HTTP and stdio) and whatever its `tools`. Leave the +key out, or set `true`, and the skill is offered as above. The key changes +nothing on the in-product runtime: the `ask` / `build` agents resolve, bind +and activate the skill exactly as before. + +```typescript +export const RecordWritingSkill = defineSkill({ + name: 'record_writing', + label: 'Record Writing', + instructions: 'Open the record, propose the change, and wait for the user to confirm on the card.', + tools: ['create_record', 'update_record'], + mcpPrompt: false, // written for the in-product agents only +}); +``` + **Only the instructions half projects.** A skill's `tools` / `surface` / `triggerConditions` are bound by the **in-product agent runtime** (the `ask` / `build` agents, cloud / Enterprise), which is the thing that composes a tool set diff --git a/packages/lint/src/validate-ai-surface-affinity.test.ts b/packages/lint/src/validate-ai-surface-affinity.test.ts index fe1c40d38c1..7a80e0e1945 100644 --- a/packages/lint/src/validate-ai-surface-affinity.test.ts +++ b/packages/lint/src/validate-ai-surface-affinity.test.ts @@ -73,6 +73,21 @@ describe('validate-ai-surface-affinity', () => { expect(findings[0].message).toContain("'build'"); }); + it('reads a skill its owner keeps out of MCP (mcpPrompt: false) exactly as one without the key (#34167)', () => { + // The opt-out narrows MCP prompt projection only; the in-product binding + // this rule guards is the same either way. + const stack = (mcpPrompt?: boolean) => ({ + agents: [{ name: 'helper', surface: 'ask', skills: ['metadata_authoring', 'record_writing'] }], + skills: [ + { name: 'metadata_authoring', surface: 'build', tools: [], ...(mcpPrompt === undefined ? {} : { mcpPrompt }) }, + { name: 'record_writing', surface: 'ask', tools: ['create_record'], ...(mcpPrompt === undefined ? {} : { mcpPrompt }) }, + ], + }); + const undeclared = validateAiSurfaceAffinity(stack()); + expect(undeclared).toHaveLength(1); + expect(validateAiSurfaceAffinity(stack(false))).toEqual(undeclared); + }); + it("flags a 'build' agent referencing an 'ask' skill (symmetric)", () => { const stack = { agents: [{ name: 'builder', surface: 'build', skills: ['data_explorer'] }], diff --git a/packages/lint/src/validate-ai-tool-references.test.ts b/packages/lint/src/validate-ai-tool-references.test.ts index af662ff2a4a..8b0d7569f28 100644 --- a/packages/lint/src/validate-ai-tool-references.test.ts +++ b/packages/lint/src/validate-ai-tool-references.test.ts @@ -57,6 +57,23 @@ describe('validate-ai-tool-references', () => { ]); }); + it('checks the tools of a skill its owner keeps out of MCP (mcpPrompt: false) exactly as without the key (#34167)', () => { + // The opt-out narrows MCP prompt projection only: the binding is still the + // in-product agent's tool set, and still checked in both distributions. + const stack = (mcpPrompt?: boolean) => ({ + skills: [ + { + name: 'record_writing', + tools: ['create_record', 'update_record', 'open_record_card'], + ...(mcpPrompt === undefined ? {} : { mcpPrompt }), + }, + ], + }); + const undeclared = validateAiToolReferences(stack()); + expect(undeclared).toHaveLength(1); + expect(validateAiToolReferences(stack(false))).toEqual(undeclared); + }); + it('resolves declared stack.tools records (the optional refinement layer)', () => { const stack = { tools: [{ name: 'quote_discount', label: 'Quote', description: 'x' }], diff --git a/packages/mcp/src/skill-prompts.test.ts b/packages/mcp/src/skill-prompts.test.ts index 1a019c8b0b2..b1f0dad9046 100644 --- a/packages/mcp/src/skill-prompts.test.ts +++ b/packages/mcp/src/skill-prompts.test.ts @@ -556,8 +556,14 @@ describe('a skill its owner declares in-product only is never an MCP prompt (#34 }); it('declared in-product only, the same skill is neither listed nor got', async () => { - const stdio = await stdioPrompts([inProductOnly(OPEN_RECORD), inProductOnly(RECORD_WRITING)]); - expect(stdio.names).toEqual([]); + // An undeclared sibling keeps the prompt surface up: the SDK declares no + // prompts capability on a server that registers no prompt at all. + const stdio = await stdioPrompts([ + inProductOnly(OPEN_RECORD), + inProductOnly(RECORD_WRITING), + { ...OPEN_RECORD, name: 'mcp_opening' }, + ]); + expect(stdio.names).toEqual(['mcp_opening']); await expect(stdio.client.getPrompt({ name: 'record_opening' })).rejects.toMatchObject({ code: -32602 }); await stdio.close(); }); diff --git a/packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts b/packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts index 176873cb0c6..94583374385 100644 --- a/packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts +++ b/packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts @@ -384,9 +384,11 @@ describe('#17501 — /meta/types serves a real schema for `action`, and moves no // owner names to serve its definition to callers its own door admits. // [#32983] `position` 13 → 14: `renamedFrom`, the earlier names whose // holders the security plugin moves to the renamed position at boot. + // [#34167] `skill` 16 → 17: `mcpPrompt`, the owner's opt-out of MCP + // prompt projection for a skill written for the in-product agents only. const CARD_PROPERTY_COUNTS: Record = { agent: 24, app: 24, dashboard: 21, dataset: 17, field: 83, flow: 23, - hook: 23, object: 50, page: 28, position: 14, report: 24, skill: 16, tool: 14, + hook: 23, object: 50, page: 28, position: 14, report: 24, skill: 17, tool: 14, }; it.each(Object.entries(CARD_PROPERTY_COUNTS))( diff --git a/packages/spec/authorable-surface/ai.json b/packages/spec/authorable-surface/ai.json index 8f844315fcb..2f500a3efa9 100644 --- a/packages/spec/authorable-surface/ai.json +++ b/packages/spec/authorable-surface/ai.json @@ -376,6 +376,7 @@ "ai/Skill:description", "ai/Skill:instructions", "ai/Skill:label", + "ai/Skill:mcpPrompt", "ai/Skill:name", "ai/Skill:protection", "ai/Skill:surface", diff --git a/packages/spec/liveness/skill.json b/packages/spec/liveness/skill.json index 3efeb504088..ee38cfdd757 100644 --- a/packages/spec/liveness/skill.json +++ b/packages/spec/liveness/skill.json @@ -51,6 +51,13 @@ "evidence": "cloud @cb8ee7ff: packages/service-ai/src/skill-registry.ts#matchesContext — each condition is evaluated against the turn's SkillContext, and a skill that fails is not attached.", "note": "THE activation gate — AND of {field,operator,value}. CLOUD-RUNTIME-ONLY (#3905): MCP has no server-side activation step; a client lists every projected prompt and chooses." }, + "mcpPrompt": { + "status": "live", + "verifiedAt": "2026-11-16", + "evidenceScope": "in-repo", + "evidence": "packages/mcp/src/skill-prompts.ts#projectSkillPrompt — a row declaring false is never projected, so registerSkillPrompts (the per-request HTTP prompt surface and any host server that calls it) and MCPServerRuntime.bridgePrompts (the long-lived stdio server) neither list nor get it, whatever its tools binding.", + "note": "the owner's opt-out of MCP prompt projection: false = written for the in-product agents only (their tools, their approval card). Absent or true = offered as before, where the server serves the bound tools. The cloud agent runtime does not read it; resolution, binding and activation are unchanged." + }, "active": { "status": "live", "verifiedAt": "2026-09-15", diff --git a/packages/spec/src/ai/skill.test.ts b/packages/spec/src/ai/skill.test.ts index 2254c7659bb..71071d2d223 100644 --- a/packages/spec/src/ai/skill.test.ts +++ b/packages/spec/src/ai/skill.test.ts @@ -159,6 +159,25 @@ describe('SkillSchema', () => { }); }); +describe('SkillSchema.mcpPrompt — the owner\'s opt-out of MCP projection (#34167)', () => { + const base = { name: 'record_writing', label: 'Record Writing', instructions: 'Write records.', tools: ['create_record'] }; + + it('accepts true and false, and refuses a non-boolean', () => { + expect(SkillSchema.parse({ ...base, mcpPrompt: false }).mcpPrompt).toBe(false); + expect(SkillSchema.parse({ ...base, mcpPrompt: true }).mcpPrompt).toBe(true); + expect(SkillSchema.safeParse({ ...base, mcpPrompt: 'no' }).success).toBe(false); + }); + + it('has no default: a skill without it parses with no mcpPrompt key, as before', () => { + expect('mcpPrompt' in SkillSchema.parse(base)).toBe(false); + }); + + it('changes nothing the in-product runtime reads: surface, tools, triggerConditions and active parse the same', () => { + const { mcpPrompt: _optOut, ...declared } = SkillSchema.parse({ ...base, surface: 'build', mcpPrompt: false }); + expect(declared).toEqual(SkillSchema.parse({ ...base, surface: 'build' })); + }); +}); + describe('defineSkill', () => { it('should return a parsed skill', () => { const skill = defineSkill({ From e37391b62cd8dd61acad1b6906bec1fdb5c47617 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 00:36:11 +0000 Subject: [PATCH 3/7] chore(spec): regenerate skill reference docs and liveness counts Claude-Session: https://claude.ai/code/session_01L9qiby4dRyeuWrpDd4sZKx Co-Authored-By: Claude --- content/docs/references/ai/skill.mdx | 5 +++-- packages/spec/liveness/state-counts/skill.md | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/content/docs/references/ai/skill.mdx b/content/docs/references/ai/skill.mdx index 7e024b14924..4e9c568297d 100644 --- a/content/docs/references/ai/skill.mdx +++ b/content/docs/references/ai/skill.mdx @@ -37,10 +37,11 @@ const result = SkillSchema.parse(data); | **label** | `string` | ✅ | Skill display name | | **description** | `string` | optional | Skill description | | **surface** | `Enum<'ask' \| 'build' \| 'both'>` | optional (default: `"ask"`) | Agent surface this skill binds to ('ask' \| 'build' \| 'both') — ADR-0063 §3; read by the cloud agent runtime only | -| **instructions** | `string` | optional | LLM instructions when skill is active — also served as an MCP prompt | -| **tools** | `string[]` | ✅ | Tool names belonging to this skill (supports trailing wildcard, e.g. `action_*`) — bound by the cloud agent runtime; an MCP server whose prompts `registerSkillPrompts` installs offers the skill only when it serves every tool named here (an `action_` entry also through `run_action`) | +| **instructions** | `string` | optional | LLM instructions when skill is active — also served as an MCP prompt unless mcpPrompt is false | +| **tools** | `string[]` | ✅ | Tool names belonging to this skill (supports trailing wildcard, e.g. `action_*`) — bound by the cloud agent runtime; an MCP server whose prompts `registerSkillPrompts` installs offers the skill only when it serves every tool named here (an `action_` entry also through `run_action`); `mcpPrompt: false` withholds it from MCP whatever this binding | | **triggerConditions** | `{ field: string; operator: Enum<'eq' \| 'neq' \| 'in' \| 'not_in' \| 'contains'>; value: string \| string[] }[]` | optional | Programmatic activation conditions — evaluated by the cloud agent runtime only | | **active** | `boolean` | optional (default: `true`) | Whether the skill is enabled | +| **mcpPrompt** | `boolean` | optional | Whether this skill is offered as an MCP prompt. false = written for the in-product agents only: never listed by prompts/list and unknown to prompts/get on any MCP connection, whatever its tools binding. Absent or true = offered where the server serves its tools | | **protection** | `{ lock: Enum<'none' \| 'no-overlay' \| 'no-delete' \| 'full'>; reason: string; docsUrl?: string }` | optional | Package author protection block — lock policy for this skill. | | **_lock** | `Enum<'none' \| 'no-overlay' \| 'no-delete' \| 'full'>` | optional | Item-level lock — controls overlay & delete (ADR-0010). | | **_lockReason** | `string` | optional | Human-readable reason shown when a write is refused by _lock. | diff --git a/packages/spec/liveness/state-counts/skill.md b/packages/spec/liveness/state-counts/skill.md index 6fd748e36c8..d4571cc02b7 100644 --- a/packages/spec/liveness/state-counts/skill.md +++ b/packages/spec/liveness/state-counts/skill.md @@ -12,4 +12,4 @@ committed anywhere: `check:liveness` sums the shards when it reads them. | Type | live | exp | elsewhere | dead | planned | classified | |---|---|---|---|---|---|---| -| `skill` | 16 | 0 | 0 | 0 | 0 | 16 | +| `skill` | 17 | 0 | 0 | 0 | 0 | 17 | From 6783ffaf817fe7060b1964344101108f0304ca98 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 01:23:06 +0000 Subject: [PATCH 4/7] feat(spec): label the skill form's MCP prompt toggle and add its translations Claude-Session: https://claude.ai/code/session_01L9qiby4dRyeuWrpDd4sZKx Co-Authored-By: Claude --- .../src/apps/translations/ar.metadata-forms.generated.ts | 4 ++++ .../src/apps/translations/ar.source-hashes.generated.ts | 2 ++ .../src/apps/translations/de.metadata-forms.generated.ts | 4 ++++ .../src/apps/translations/de.source-hashes.generated.ts | 2 ++ .../src/apps/translations/en.metadata-forms.generated.ts | 4 ++++ .../src/apps/translations/es-ES.metadata-forms.generated.ts | 4 ++++ .../src/apps/translations/fr.metadata-forms.generated.ts | 4 ++++ .../src/apps/translations/fr.source-hashes.generated.ts | 2 ++ .../src/apps/translations/ja-JP.metadata-forms.generated.ts | 4 ++++ .../src/apps/translations/ko.metadata-forms.generated.ts | 4 ++++ .../src/apps/translations/ko.source-hashes.generated.ts | 2 ++ .../src/apps/translations/pt-BR.metadata-forms.generated.ts | 4 ++++ .../src/apps/translations/pt-BR.source-hashes.generated.ts | 2 ++ .../src/apps/translations/ru.metadata-forms.generated.ts | 4 ++++ .../src/apps/translations/ru.source-hashes.generated.ts | 2 ++ .../src/apps/translations/zh-CN.metadata-forms.generated.ts | 4 ++++ .../src/apps/translations/zh-Hant.metadata-forms.generated.ts | 4 ++++ .../src/apps/translations/zh-Hant.source-hashes.generated.ts | 2 ++ packages/spec/src/ai/skill.form.ts | 2 +- 19 files changed, 59 insertions(+), 1 deletion(-) diff --git a/packages/platform-objects/src/apps/translations/ar.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/ar.metadata-forms.generated.ts index 63f7f7fb176..d024e4d6112 100644 --- a/packages/platform-objects/src/apps/translations/ar.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/ar.metadata-forms.generated.ts @@ -2829,6 +2829,10 @@ export const arMetadataForms: NonNullable = { label: "الأدوات", helpText: "أسماء الأدوات (تدعم حرف البدل: action_*)" }, + mcpPrompt: { + label: "Offer as MCP prompt", + helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." + }, triggerConditions: { label: "شروط التشغيل", helpText: "شروط برمجية (مثل objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/ar.source-hashes.generated.ts b/packages/platform-objects/src/apps/translations/ar.source-hashes.generated.ts index 95fadcc230d..a5d3a65e726 100644 --- a/packages/platform-objects/src/apps/translations/ar.source-hashes.generated.ts +++ b/packages/platform-objects/src/apps/translations/ar.source-hashes.generated.ts @@ -24,6 +24,8 @@ export const arGeneratedSourceHashes: Readonly> = { "metadataForms.permission.fields.objects.helpText": "e2512cfb3b501aae", "metadataForms.permission.fields.tabPermissions.helpText": "8942e2aebe59897c", "metadataForms.position.fields.name.helpText": "3594bba7cc2a3c8a", + "metadataForms.skill.fields.mcpPrompt.helpText": "23d70850b9794ec7", + "metadataForms.skill.fields.mcpPrompt.label": "52a386069c5cc374", "objects.sys_email.fields.message_id.label": "14cd089a4062f4b1", "objects.sys_email_template.fields.package_id.help": "e1f8cc4d0105cedc", "objects.sys_email_template.fields.package_id.label": "aacf5e74a8641b2b", diff --git a/packages/platform-objects/src/apps/translations/de.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/de.metadata-forms.generated.ts index 8fc7676271b..812efb389ef 100644 --- a/packages/platform-objects/src/apps/translations/de.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/de.metadata-forms.generated.ts @@ -2829,6 +2829,10 @@ export const deMetadataForms: NonNullable = { label: "Werkzeuge", helpText: "Werkzeugnamen (unterstützt Platzhalter: action_*)" }, + mcpPrompt: { + label: "Offer as MCP prompt", + helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." + }, triggerConditions: { label: "Auslösebedingungen", helpText: "Programmatische Bedingungen (z. B. objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/de.source-hashes.generated.ts b/packages/platform-objects/src/apps/translations/de.source-hashes.generated.ts index cf91687b0df..d34e82ac77b 100644 --- a/packages/platform-objects/src/apps/translations/de.source-hashes.generated.ts +++ b/packages/platform-objects/src/apps/translations/de.source-hashes.generated.ts @@ -66,6 +66,8 @@ export const deGeneratedSourceHashes: Readonly> = { "metadataForms.report.fields.dataset.label": "19647dcb84ce82d3", "metadataForms.report.fields.drilldown.label": "25ae77d240ced5f5", "metadataForms.report.fields.name.label": "5274417ff1ccaf01", + "metadataForms.skill.fields.mcpPrompt.helpText": "23d70850b9794ec7", + "metadataForms.skill.fields.mcpPrompt.label": "52a386069c5cc374", "metadataForms.skill.fields.name.label": "5274417ff1ccaf01", "metadataForms.tool.fields.name.label": "5274417ff1ccaf01", "metadataForms.tool.sections.schemas.label": "e288a14c24f0afe7", diff --git a/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts index 328473cddb0..2b8ae3d160a 100644 --- a/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts @@ -2829,6 +2829,10 @@ export const enMetadataForms: NonNullable = { label: "Tools", helpText: "Tool names (supports wildcard: action_*)" }, + mcpPrompt: { + label: "Offer as MCP prompt", + helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." + }, triggerConditions: { label: "Trigger Conditions", helpText: "Programmatic conditions (e.g., objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/es-ES.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/es-ES.metadata-forms.generated.ts index 8109d542dc4..6e3fe642de0 100644 --- a/packages/platform-objects/src/apps/translations/es-ES.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/es-ES.metadata-forms.generated.ts @@ -2829,6 +2829,10 @@ export const esESMetadataForms: NonNullable = label: "Herramientas", helpText: "Nombres de herramienta (admite comodín: action_*)" }, + mcpPrompt: { + label: "Ofrecer como prompt MCP", + helpText: "Ofrece esta habilidad como prompt MCP. Desactívalo para un manual escrito solo para los agentes del producto (sus herramientas, su tarjeta de aprobación): ya no se lista a los clientes MCP, sean cuales sean sus herramientas. Sin definir = se ofrece." + }, triggerConditions: { label: "Condiciones disparadoras", helpText: "Condiciones programáticas (p. ej., objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/fr.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/fr.metadata-forms.generated.ts index 338d452a1af..96942f14537 100644 --- a/packages/platform-objects/src/apps/translations/fr.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/fr.metadata-forms.generated.ts @@ -2829,6 +2829,10 @@ export const frMetadataForms: NonNullable = { label: "Outils", helpText: "Noms des outils (prend en charge le joker : action_*)" }, + mcpPrompt: { + label: "Offer as MCP prompt", + helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." + }, triggerConditions: { label: "Conditions de déclenchement", helpText: "Conditions programmatiques (par ex. objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/fr.source-hashes.generated.ts b/packages/platform-objects/src/apps/translations/fr.source-hashes.generated.ts index 052e7f2ba4d..234c14e3af0 100644 --- a/packages/platform-objects/src/apps/translations/fr.source-hashes.generated.ts +++ b/packages/platform-objects/src/apps/translations/fr.source-hashes.generated.ts @@ -98,6 +98,8 @@ export const frGeneratedSourceHashes: Readonly> = { "metadataForms.skill.fields.active.label": "eee107cf4e466779", "metadataForms.skill.fields.description.label": "779a4342c8eb6707", "metadataForms.skill.fields.instructions.label": "ed1cc73e669573d0", + "metadataForms.skill.fields.mcpPrompt.helpText": "23d70850b9794ec7", + "metadataForms.skill.fields.mcpPrompt.label": "52a386069c5cc374", "metadataForms.skill.fields.surface.label": "5f41277948ff2598", "metadataForms.tool.fields.description.label": "779a4342c8eb6707", "metadataForms.view.fields.addRecord.position.label": "9a24c02e441eb0b4", diff --git a/packages/platform-objects/src/apps/translations/ja-JP.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/ja-JP.metadata-forms.generated.ts index 3f6cd992f09..de2dcf4d938 100644 --- a/packages/platform-objects/src/apps/translations/ja-JP.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/ja-JP.metadata-forms.generated.ts @@ -2829,6 +2829,10 @@ export const jaJPMetadataForms: NonNullable = label: "ツール", helpText: "ツール名(ワイルドカード対応: action_*)" }, + mcpPrompt: { + label: "MCP プロンプトとして提供", + helpText: "このスキルを MCP プロンプトとして提供します。製品内エージェント専用に書かれたプレイブック(そのツールと承認カードを前提とするもの)ではオフにしてください。オフにすると、ツールに関係なく MCP クライアントには一覧表示されません。未設定 = 提供。" + }, triggerConditions: { label: "トリガー条件", helpText: "プログラム条件(例: objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/ko.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/ko.metadata-forms.generated.ts index 83b6a3e1992..0eeed526e05 100644 --- a/packages/platform-objects/src/apps/translations/ko.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/ko.metadata-forms.generated.ts @@ -2829,6 +2829,10 @@ export const koMetadataForms: NonNullable = { label: "도구", helpText: "도구 이름(와일드카드 지원: action_*)" }, + mcpPrompt: { + label: "Offer as MCP prompt", + helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." + }, triggerConditions: { label: "트리거 조건", helpText: "프로그래밍 방식 조건(예: objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/ko.source-hashes.generated.ts b/packages/platform-objects/src/apps/translations/ko.source-hashes.generated.ts index f4542414298..ef3b9d2a7ad 100644 --- a/packages/platform-objects/src/apps/translations/ko.source-hashes.generated.ts +++ b/packages/platform-objects/src/apps/translations/ko.source-hashes.generated.ts @@ -24,6 +24,8 @@ export const koGeneratedSourceHashes: Readonly> = { "metadataForms.permission.fields.objects.helpText": "e2512cfb3b501aae", "metadataForms.permission.fields.tabPermissions.helpText": "8942e2aebe59897c", "metadataForms.position.fields.name.helpText": "3594bba7cc2a3c8a", + "metadataForms.skill.fields.mcpPrompt.helpText": "23d70850b9794ec7", + "metadataForms.skill.fields.mcpPrompt.label": "52a386069c5cc374", "objects.sys_email.fields.message_id.label": "14cd089a4062f4b1", "objects.sys_email_template.fields.id.label": "00b0385c9c152888", "objects.sys_email_template.fields.package_id.help": "e1f8cc4d0105cedc", diff --git a/packages/platform-objects/src/apps/translations/pt-BR.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/pt-BR.metadata-forms.generated.ts index 364cb7ba667..6c296f073e2 100644 --- a/packages/platform-objects/src/apps/translations/pt-BR.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/pt-BR.metadata-forms.generated.ts @@ -2829,6 +2829,10 @@ export const ptBRMetadataForms: NonNullable = label: "Ferramentas", helpText: "Nomes das ferramentas (aceita curinga: action_*)" }, + mcpPrompt: { + label: "Offer as MCP prompt", + helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." + }, triggerConditions: { label: "Condições de ativação", helpText: "Condições programáticas (por exemplo, objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/pt-BR.source-hashes.generated.ts b/packages/platform-objects/src/apps/translations/pt-BR.source-hashes.generated.ts index dc8b3f44160..f87422ae4b5 100644 --- a/packages/platform-objects/src/apps/translations/pt-BR.source-hashes.generated.ts +++ b/packages/platform-objects/src/apps/translations/pt-BR.source-hashes.generated.ts @@ -38,6 +38,8 @@ export const ptBRGeneratedSourceHashes: Readonly> = { "metadataForms.permission.fields.objects.helpText": "e2512cfb3b501aae", "metadataForms.permission.fields.tabPermissions.helpText": "8942e2aebe59897c", "metadataForms.position.fields.name.helpText": "3594bba7cc2a3c8a", + "metadataForms.skill.fields.mcpPrompt.helpText": "23d70850b9794ec7", + "metadataForms.skill.fields.mcpPrompt.label": "52a386069c5cc374", "metadataForms.view.fields.gantt.label": "57ffc6ef520edfc5", "metadataForms.view.fields.kanban.label": "dd95c452aa71459e", "metadataForms.view.sections.gantt.label": "57ffc6ef520edfc5", diff --git a/packages/platform-objects/src/apps/translations/ru.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/ru.metadata-forms.generated.ts index ef3ff534857..910db48019e 100644 --- a/packages/platform-objects/src/apps/translations/ru.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/ru.metadata-forms.generated.ts @@ -2829,6 +2829,10 @@ export const ruMetadataForms: NonNullable = { label: "Инструменты", helpText: "Имена инструментов (поддерживается подстановка: action_*)" }, + mcpPrompt: { + label: "Offer as MCP prompt", + helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." + }, triggerConditions: { label: "Условия активации", helpText: "Программные условия (например, objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/ru.source-hashes.generated.ts b/packages/platform-objects/src/apps/translations/ru.source-hashes.generated.ts index 803c7a5c745..2aa56c04f0f 100644 --- a/packages/platform-objects/src/apps/translations/ru.source-hashes.generated.ts +++ b/packages/platform-objects/src/apps/translations/ru.source-hashes.generated.ts @@ -24,6 +24,8 @@ export const ruGeneratedSourceHashes: Readonly> = { "metadataForms.permission.fields.objects.helpText": "e2512cfb3b501aae", "metadataForms.permission.fields.tabPermissions.helpText": "8942e2aebe59897c", "metadataForms.position.fields.name.helpText": "3594bba7cc2a3c8a", + "metadataForms.skill.fields.mcpPrompt.helpText": "23d70850b9794ec7", + "metadataForms.skill.fields.mcpPrompt.label": "52a386069c5cc374", "objects.sys_email.fields.message_id.label": "14cd089a4062f4b1", "objects.sys_email_template.fields.id.label": "00b0385c9c152888", "objects.sys_email_template.fields.package_id.help": "e1f8cc4d0105cedc", diff --git a/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts index 6305508ab42..d24dcbcb67f 100644 --- a/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts @@ -2829,6 +2829,10 @@ export const zhCNMetadataForms: NonNullable = label: "工具", helpText: "工具名(支持通配符:action_*)" }, + mcpPrompt: { + label: "作为 MCP 提示词提供", + helpText: "将此技能作为 MCP 提示词提供。若剧本只为产品内智能体编写(依赖它们的工具和审批卡片),请关闭:此后无论绑定哪些工具,都不会向 MCP 客户端列出。未设置 = 提供。" + }, triggerConditions: { label: "触发条件", helpText: "程序化条件(如 objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/zh-Hant.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/zh-Hant.metadata-forms.generated.ts index 8672e220bf2..d1d104558c6 100644 --- a/packages/platform-objects/src/apps/translations/zh-Hant.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/zh-Hant.metadata-forms.generated.ts @@ -2829,6 +2829,10 @@ export const zhHantMetadataForms: NonNullable label: "工具", helpText: "工具名(支援萬用字元:action_*)" }, + mcpPrompt: { + label: "Offer as MCP prompt", + helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." + }, triggerConditions: { label: "觸發條件", helpText: "程式化條件(如 objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/zh-Hant.source-hashes.generated.ts b/packages/platform-objects/src/apps/translations/zh-Hant.source-hashes.generated.ts index e9a90d643c2..2ecfa87977d 100644 --- a/packages/platform-objects/src/apps/translations/zh-Hant.source-hashes.generated.ts +++ b/packages/platform-objects/src/apps/translations/zh-Hant.source-hashes.generated.ts @@ -18,6 +18,8 @@ */ export const zhHantGeneratedSourceHashes: Readonly> = { + "metadataForms.skill.fields.mcpPrompt.helpText": "23d70850b9794ec7", + "metadataForms.skill.fields.mcpPrompt.label": "52a386069c5cc374", "objects.sys_email.fields.message_id.label": "14cd089a4062f4b1", "objects.sys_email_template.fields.id.label": "00b0385c9c152888", "objects.sys_exchange_rate.fields.id.label": "00b0385c9c152888", diff --git a/packages/spec/src/ai/skill.form.ts b/packages/spec/src/ai/skill.form.ts index f99c6ca3d9f..bfcbd63478d 100644 --- a/packages/spec/src/ai/skill.form.ts +++ b/packages/spec/src/ai/skill.form.ts @@ -37,7 +37,7 @@ export const skillForm = defineForm({ fields: [ { field: 'instructions', widget: 'textarea', helpText: 'Instructions for AI — tell it how to use these tools together' }, { field: 'tools', widget: 'string-tags', required: true, helpText: 'Tool names (supports wildcard: action_*)' }, - { field: 'mcpPrompt', colSpan: 1, helpText: 'Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered.' }, + { field: 'mcpPrompt', label: 'Offer as MCP prompt', colSpan: 1, helpText: 'Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered.' }, ], }, { From ca45b0093004fa91e2b7e9496848fa5f03597118 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 01:25:31 +0000 Subject: [PATCH 5/7] chore: changeset names platform-objects for the form catalogs Claude-Session: https://claude.ai/code/session_01L9qiby4dRyeuWrpDd4sZKx Co-Authored-By: Claude --- .changeset/34167-skill-mcp-opt-out.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.changeset/34167-skill-mcp-opt-out.md b/.changeset/34167-skill-mcp-opt-out.md index dcde06495f3..3582a45a31e 100644 --- a/.changeset/34167-skill-mcp-opt-out.md +++ b/.changeset/34167-skill-mcp-opt-out.md @@ -1,6 +1,7 @@ --- '@objectstack/spec': minor '@objectstack/mcp': minor +'@objectstack/platform-objects': minor --- feat(spec, mcp): a skill written for the in-product agents only opts out of MCP prompt projection with `mcpPrompt: false` @@ -12,6 +13,6 @@ Metadata-protocol: added The binding test (a skill is offered only where the connection serves every tool it binds) answers whether a connection can run a playbook. It cannot tell whether the playbook is written for MCP. A skill can bind tools MCP serves under the same names, such as `create_record` and `update_record`, or `action_*` through `run_action`, and still tell the model to call in-product tools and wait for the in-product approval card, which an MCP client does not have. The skill's owner now says so on the skill. -A skill without the key, or with `mcpPrompt: true`, is offered exactly as before, and nothing parses differently: the key has no default. The key changes nothing on the in-product agent runtime, which resolves, binds and activates the skill as it did, and the authoring checks on `tools` and `surface` report the same findings. The skill form offers the key as a toggle in its Basics section. +A skill without the key, or with `mcpPrompt: true`, is offered exactly as before, and nothing parses differently: the key has no default. The key changes nothing on the in-product agent runtime, which resolves, binds and activates the skill as it did, and the authoring checks on `tools` and `surface` report the same findings. The skill form offers the key as a toggle, Offer as MCP prompt, in its Basics section, with its label and help text translated in the platform's form catalogs. Nothing to migrate. From 50ccfc48fb6776a7e31d050e6592d75ca6f41704 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 01:37:15 +0000 Subject: [PATCH 6/7] test(platform-objects): the translated metadata-form catalog gains the skill form's MCP prompt toggle Claude-Session: https://claude.ai/code/session_01L9qiby4dRyeuWrpDd4sZKx Co-Authored-By: Claude --- .../object-lifecycle-panel-echo-decisions.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts b/packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts index b6691bf30e5..9be8df8bbc1 100644 --- a/packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts +++ b/packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts @@ -1286,7 +1286,10 @@ describe('#19403 round 10 — the verdicts, on the live bundles', () => { // 741 since #33657: the hook form's refusal entry offers `reasons` (with // its `message`) and `params` — three row labels, authored in all three // locales. - expect(translated.length, `${locale} positive control`).toBe(741); + // 742 since #34167: the skill form offers `mcpPrompt` (the owner's + // opt-out of MCP prompt projection) — one field label, authored in all + // three locales. + expect(translated.length, `${locale} positive control`).toBe(742); } // ⭐ DARK — the blindness, executable. On a synthetic two-locale catalog the // all-three predicate returns 0 while the per-locale one returns 1, so the From c53ea9d14701a0667f423e0d45b7c6749bd57f20 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 01:56:12 +0000 Subject: [PATCH 7/7] fix(mcp): the stdio server stops serving a skill saved in-product only; the skill form leaves the key to source Claude-Session: https://claude.ai/code/session_01L9qiby4dRyeuWrpDd4sZKx Co-Authored-By: Claude --- .changeset/34167-skill-mcp-opt-out.md | 5 +-- content/docs/ai/agents.mdx | 5 ++- content/docs/ai/connect-mcp.mdx | 7 +++-- packages/mcp/src/mcp-server-runtime.ts | 21 +++++++++++-- packages/mcp/src/skill-prompts.test.ts | 31 +++++++++++++++++-- packages/mcp/src/skill-prompts.ts | 19 ++++++++++++ .../ar.metadata-forms.generated.ts | 4 --- .../ar.source-hashes.generated.ts | 2 -- .../de.metadata-forms.generated.ts | 4 --- .../de.source-hashes.generated.ts | 2 -- .../en.metadata-forms.generated.ts | 4 --- .../es-ES.metadata-forms.generated.ts | 4 --- .../fr.metadata-forms.generated.ts | 4 --- .../fr.source-hashes.generated.ts | 2 -- .../ja-JP.metadata-forms.generated.ts | 4 --- .../ko.metadata-forms.generated.ts | 4 --- .../ko.source-hashes.generated.ts | 2 -- ...ect-lifecycle-panel-echo-decisions.test.ts | 5 +-- .../pt-BR.metadata-forms.generated.ts | 4 --- .../pt-BR.source-hashes.generated.ts | 2 -- .../ru.metadata-forms.generated.ts | 4 --- .../ru.source-hashes.generated.ts | 2 -- .../zh-CN.metadata-forms.generated.ts | 4 --- .../zh-Hant.metadata-forms.generated.ts | 4 --- .../zh-Hant.source-hashes.generated.ts | 2 -- packages/spec/src/ai/skill.form.ts | 1 - packages/spec/src/ai/skill.zod.ts | 4 ++- .../metadata-form-zod-reconciliation.test.ts | 9 ++++++ 28 files changed, 91 insertions(+), 74 deletions(-) diff --git a/.changeset/34167-skill-mcp-opt-out.md b/.changeset/34167-skill-mcp-opt-out.md index 3582a45a31e..0ce29c437d5 100644 --- a/.changeset/34167-skill-mcp-opt-out.md +++ b/.changeset/34167-skill-mcp-opt-out.md @@ -1,7 +1,6 @@ --- '@objectstack/spec': minor '@objectstack/mcp': minor -'@objectstack/platform-objects': minor --- feat(spec, mcp): a skill written for the in-product agents only opts out of MCP prompt projection with `mcpPrompt: false` @@ -13,6 +12,8 @@ Metadata-protocol: added The binding test (a skill is offered only where the connection serves every tool it binds) answers whether a connection can run a playbook. It cannot tell whether the playbook is written for MCP. A skill can bind tools MCP serves under the same names, such as `create_record` and `update_record`, or `action_*` through `run_action`, and still tell the model to call in-product tools and wait for the in-product approval card, which an MCP client does not have. The skill's owner now says so on the skill. -A skill without the key, or with `mcpPrompt: true`, is offered exactly as before, and nothing parses differently: the key has no default. The key changes nothing on the in-product agent runtime, which resolves, binds and activates the skill as it did, and the authoring checks on `tools` and `surface` report the same findings. The skill form offers the key as a toggle, Offer as MCP prompt, in its Basics section, with its label and help text translated in the platform's form catalogs. +The stdio server takes its prompt list once, at boot. A skill saved with `mcpPrompt: false` while it runs stays on that list until restart, as any skill saved after boot is missing from it, but its `prompts/get` answers it as unknown at once. + +A skill without the key, or with `mcpPrompt: true`, is offered exactly as before, and nothing parses differently: the key has no default. The key changes nothing on the in-product agent runtime, which resolves, binds and activates the skill as it did, and the authoring checks on `tools` and `surface` report the same findings. The skill form does not offer the key: unset means offered, and the form's boolean switch would draw every offered skill as off, so `mcpPrompt` is authored in source or through the metadata API. Nothing to migrate. diff --git a/content/docs/ai/agents.mdx b/content/docs/ai/agents.mdx index f78d175e693..a6535f4f28a 100644 --- a/content/docs/ai/agents.mdx +++ b/content/docs/ai/agents.mdx @@ -275,7 +275,10 @@ connection unless a host registers that tool. the in-product approval card even when every tool it binds is one MCP serves too. With `mcpPrompt: false` the skill is never listed by `prompts/list` and is unknown to `prompts/get`, on every MCP connection, stdio included, whatever its -`tools`. Absent or `true`, it is offered as described above. ObjectOS reads the +`tools`. The stdio server takes its list once, at boot: a skill switched to +`false` while it runs stays listed until restart, but `prompts/get` answers it +as unknown at once. +Absent or `true`, it is offered as described above. ObjectOS reads the skill exactly as before: the key decides MCP projection and nothing else ([Connect an MCP client](/docs/ai/connect-mcp#prompts-your-skills-served-to-the-client)). diff --git a/content/docs/ai/connect-mcp.mdx b/content/docs/ai/connect-mcp.mdx index daa582d1a00..562b1883b1e 100644 --- a/content/docs/ai/connect-mcp.mdx +++ b/content/docs/ai/connect-mcp.mdx @@ -506,8 +506,11 @@ for MCP: a skill can bind tools MCP serves under the same names call in-product tools or wait for the in-product approval card. Set `mcpPrompt: false` on such a skill and it is never offered as a prompt: `prompts/list` leaves it out and `prompts/get` answers it as an unknown prompt -name, on every connection (HTTP and stdio) and whatever its `tools`. Leave the -key out, or set `true`, and the skill is offered as above. The key changes +name, on every connection (HTTP and stdio) and whatever its `tools`. (The +stdio server lists its prompts once, at boot, so a skill switched to +`mcpPrompt: false` while it runs stays listed until restart; its `prompts/get` +answers unknown at once.) Leave the key out, or set `true`, and the skill is +offered as above. The key changes nothing on the in-product runtime: the `ask` / `build` agents resolve, bind and activate the skill exactly as before. diff --git a/packages/mcp/src/mcp-server-runtime.ts b/packages/mcp/src/mcp-server-runtime.ts index f73e1a4c099..9dbcf68fc24 100644 --- a/packages/mcp/src/mcp-server-runtime.ts +++ b/packages/mcp/src/mcp-server-runtime.ts @@ -49,6 +49,7 @@ import { skillPromptListEntry, skillPromptRefusalError, skillPromptResult, + skillPromptWithdrawn, type McpSkillBridge, type SkillPrompt, } from './skill-prompts.js'; @@ -2464,11 +2465,25 @@ export class MCPServerRuntime { }, async () => { // Re-read at call time so an edited skill serves fresh instructions. - const lookup = lookupSkillPrompt(await listSkillPrompts(skillBridge), entry.face); + // One read: the projection and the withdrawal check below see the same rows. + const rows = (await skillBridge.listSkills()) ?? []; + const lookup = lookupSkillPrompt( + await listSkillPrompts({ ...skillBridge, listSkills: async () => rows }), + entry.face, + ); if (lookup.status === 'refused') throw skillPromptRefusalError(lookup); if (lookup.status === 'found') return skillPromptResult(lookup.prompt); - // Gone since the snapshot: the snapshot's one skill, as before. - if (entry.prompts.length === 1) return skillPromptResult(entry.prompts[0]); + if (entry.prompts.length === 1) { + // [#34167] Withdrawn since the snapshot (`mcpPrompt: false`): + // answered as the SDK answers a name it never registered. This + // server's list is a boot snapshot and keeps the name until + // restart; the get stops serving it at once. + if (skillPromptWithdrawn(rows, entry.prompts[0])) { + throw new McpError(ErrorCode.InvalidParams, `Prompt ${entry.face} not found`); + } + // Gone since the snapshot: the snapshot's one skill, as before. + return skillPromptResult(entry.prompts[0]); + } throw skillPromptRefusalError({ status: 'refused', message: duplicateSkillFaceMessage(entry), diff --git a/packages/mcp/src/skill-prompts.test.ts b/packages/mcp/src/skill-prompts.test.ts index b1f0dad9046..4afc262b62f 100644 --- a/packages/mcp/src/skill-prompts.test.ts +++ b/packages/mcp/src/skill-prompts.test.ts @@ -530,8 +530,10 @@ describe('a skill its owner declares in-product only is never an MCP prompt (#34 tools: ['open_record'], }; - const stdioPrompts = async (rows: unknown[]) => { - const metadataService = { list: async (type: string) => (type === 'skill' ? rows : []) }; + // `store.rows` is what the metadata service answers NOW: a test swaps it + // after boot to model a skill saved while the server runs. + const stdioPrompts = async (rows: unknown[], store: { rows: unknown[] } = { rows }) => { + const metadataService = { list: async (type: string) => (type === 'skill' ? store.rows : []) }; const runtime = new MCPServerRuntime({ name: 'skill-prompts-stdio', version: '0.0.0' }); await runtime.bridgePrompts(metadataService as never); const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair(); @@ -555,6 +557,31 @@ describe('a skill its owner declares in-product only is never an MCP prompt (#34 await stdio.close(); }); + it('a skill saved in-product only while the server runs is answered as unknown at once', async () => { + const sibling = { ...OPEN_RECORD, name: 'mcp_opening' }; + const store = { rows: [OPEN_RECORD, sibling] as unknown[] }; + const stdio = await stdioPrompts(store.rows, store); + expect(stdio.names).toEqual(['record_opening', 'mcp_opening']); + + store.rows = [inProductOnly(OPEN_RECORD), sibling]; + const optedOut = await stdio.client.getPrompt({ name: 'record_opening' }).catch((e) => e); + const unknown = await stdio.client.getPrompt({ name: 'no_such_skill' }).catch((e) => e); + expect(optedOut.code).toBe(-32602); + expect(optedOut.message).toBe(unknown.message.replace('no_such_skill', 'record_opening')); + // The sibling still serves; the list is the boot snapshot until restart. + expect((await stdio.client.getPrompt({ name: 'mcp_opening' })).messages).toHaveLength(1); + await stdio.close(); + }); + + it('CONTROL: a skill gone from the store since boot is still served from the snapshot, as before', async () => { + const store = { rows: [OPEN_RECORD] as unknown[] }; + const stdio = await stdioPrompts(store.rows, store); + store.rows = []; + const got = await stdio.client.getPrompt({ name: 'record_opening' }); + expect(got.messages[0].content).toEqual({ type: 'text', text: OPEN_RECORD.instructions }); + await stdio.close(); + }); + it('declared in-product only, the same skill is neither listed nor got', async () => { // An undeclared sibling keeps the prompt surface up: the SDK declares no // prompts capability on a server that registers no prompt at all. diff --git a/packages/mcp/src/skill-prompts.ts b/packages/mcp/src/skill-prompts.ts index f2ceb1ef77a..6aed5abe576 100644 --- a/packages/mcp/src/skill-prompts.ts +++ b/packages/mcp/src/skill-prompts.ts @@ -173,6 +173,25 @@ export function projectSkillPrompt( return prompt; } +/** + * [#34167] Whether `rows` hold `prompt`'s skill (same name, same holder) as a + * row its owner has WITHDRAWN from MCP: `mcpPrompt: false` (in-product only). + * A long-lived server that registered the prompt from an + * earlier read asks this when a re-read no longer finds it, so a skill opted + * out after boot is answered as unknown rather than served from the snapshot. + * A skill that is simply gone is not withdrawn: the snapshot keeps it, as + * does one deactivated after boot (`active: false`), whose get is unchanged. + */ +export function skillPromptWithdrawn(rows: readonly unknown[], prompt: SkillPrompt): boolean { + return rows.some((raw) => { + if (!raw || typeof raw !== 'object' || Array.isArray(raw)) return false; + const record = raw as Record; + if (readString(record, 'name') !== prompt.name) return false; + if ((readString(record, '_packageId') ?? undefined) !== prompt.packageId) return false; + return record.mcpPrompt === false; + }); +} + /** * Project every skill the bridge can see. Rows that carry no instructions half * are dropped. [ADR-0150] Two packages may each hold a skill of one name, and diff --git a/packages/platform-objects/src/apps/translations/ar.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/ar.metadata-forms.generated.ts index d024e4d6112..63f7f7fb176 100644 --- a/packages/platform-objects/src/apps/translations/ar.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/ar.metadata-forms.generated.ts @@ -2829,10 +2829,6 @@ export const arMetadataForms: NonNullable = { label: "الأدوات", helpText: "أسماء الأدوات (تدعم حرف البدل: action_*)" }, - mcpPrompt: { - label: "Offer as MCP prompt", - helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." - }, triggerConditions: { label: "شروط التشغيل", helpText: "شروط برمجية (مثل objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/ar.source-hashes.generated.ts b/packages/platform-objects/src/apps/translations/ar.source-hashes.generated.ts index a5d3a65e726..95fadcc230d 100644 --- a/packages/platform-objects/src/apps/translations/ar.source-hashes.generated.ts +++ b/packages/platform-objects/src/apps/translations/ar.source-hashes.generated.ts @@ -24,8 +24,6 @@ export const arGeneratedSourceHashes: Readonly> = { "metadataForms.permission.fields.objects.helpText": "e2512cfb3b501aae", "metadataForms.permission.fields.tabPermissions.helpText": "8942e2aebe59897c", "metadataForms.position.fields.name.helpText": "3594bba7cc2a3c8a", - "metadataForms.skill.fields.mcpPrompt.helpText": "23d70850b9794ec7", - "metadataForms.skill.fields.mcpPrompt.label": "52a386069c5cc374", "objects.sys_email.fields.message_id.label": "14cd089a4062f4b1", "objects.sys_email_template.fields.package_id.help": "e1f8cc4d0105cedc", "objects.sys_email_template.fields.package_id.label": "aacf5e74a8641b2b", diff --git a/packages/platform-objects/src/apps/translations/de.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/de.metadata-forms.generated.ts index 812efb389ef..8fc7676271b 100644 --- a/packages/platform-objects/src/apps/translations/de.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/de.metadata-forms.generated.ts @@ -2829,10 +2829,6 @@ export const deMetadataForms: NonNullable = { label: "Werkzeuge", helpText: "Werkzeugnamen (unterstützt Platzhalter: action_*)" }, - mcpPrompt: { - label: "Offer as MCP prompt", - helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." - }, triggerConditions: { label: "Auslösebedingungen", helpText: "Programmatische Bedingungen (z. B. objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/de.source-hashes.generated.ts b/packages/platform-objects/src/apps/translations/de.source-hashes.generated.ts index d34e82ac77b..cf91687b0df 100644 --- a/packages/platform-objects/src/apps/translations/de.source-hashes.generated.ts +++ b/packages/platform-objects/src/apps/translations/de.source-hashes.generated.ts @@ -66,8 +66,6 @@ export const deGeneratedSourceHashes: Readonly> = { "metadataForms.report.fields.dataset.label": "19647dcb84ce82d3", "metadataForms.report.fields.drilldown.label": "25ae77d240ced5f5", "metadataForms.report.fields.name.label": "5274417ff1ccaf01", - "metadataForms.skill.fields.mcpPrompt.helpText": "23d70850b9794ec7", - "metadataForms.skill.fields.mcpPrompt.label": "52a386069c5cc374", "metadataForms.skill.fields.name.label": "5274417ff1ccaf01", "metadataForms.tool.fields.name.label": "5274417ff1ccaf01", "metadataForms.tool.sections.schemas.label": "e288a14c24f0afe7", diff --git a/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts index 2b8ae3d160a..328473cddb0 100644 --- a/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts @@ -2829,10 +2829,6 @@ export const enMetadataForms: NonNullable = { label: "Tools", helpText: "Tool names (supports wildcard: action_*)" }, - mcpPrompt: { - label: "Offer as MCP prompt", - helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." - }, triggerConditions: { label: "Trigger Conditions", helpText: "Programmatic conditions (e.g., objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/es-ES.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/es-ES.metadata-forms.generated.ts index 6e3fe642de0..8109d542dc4 100644 --- a/packages/platform-objects/src/apps/translations/es-ES.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/es-ES.metadata-forms.generated.ts @@ -2829,10 +2829,6 @@ export const esESMetadataForms: NonNullable = label: "Herramientas", helpText: "Nombres de herramienta (admite comodín: action_*)" }, - mcpPrompt: { - label: "Ofrecer como prompt MCP", - helpText: "Ofrece esta habilidad como prompt MCP. Desactívalo para un manual escrito solo para los agentes del producto (sus herramientas, su tarjeta de aprobación): ya no se lista a los clientes MCP, sean cuales sean sus herramientas. Sin definir = se ofrece." - }, triggerConditions: { label: "Condiciones disparadoras", helpText: "Condiciones programáticas (p. ej., objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/fr.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/fr.metadata-forms.generated.ts index 96942f14537..338d452a1af 100644 --- a/packages/platform-objects/src/apps/translations/fr.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/fr.metadata-forms.generated.ts @@ -2829,10 +2829,6 @@ export const frMetadataForms: NonNullable = { label: "Outils", helpText: "Noms des outils (prend en charge le joker : action_*)" }, - mcpPrompt: { - label: "Offer as MCP prompt", - helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." - }, triggerConditions: { label: "Conditions de déclenchement", helpText: "Conditions programmatiques (par ex. objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/fr.source-hashes.generated.ts b/packages/platform-objects/src/apps/translations/fr.source-hashes.generated.ts index 234c14e3af0..052e7f2ba4d 100644 --- a/packages/platform-objects/src/apps/translations/fr.source-hashes.generated.ts +++ b/packages/platform-objects/src/apps/translations/fr.source-hashes.generated.ts @@ -98,8 +98,6 @@ export const frGeneratedSourceHashes: Readonly> = { "metadataForms.skill.fields.active.label": "eee107cf4e466779", "metadataForms.skill.fields.description.label": "779a4342c8eb6707", "metadataForms.skill.fields.instructions.label": "ed1cc73e669573d0", - "metadataForms.skill.fields.mcpPrompt.helpText": "23d70850b9794ec7", - "metadataForms.skill.fields.mcpPrompt.label": "52a386069c5cc374", "metadataForms.skill.fields.surface.label": "5f41277948ff2598", "metadataForms.tool.fields.description.label": "779a4342c8eb6707", "metadataForms.view.fields.addRecord.position.label": "9a24c02e441eb0b4", diff --git a/packages/platform-objects/src/apps/translations/ja-JP.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/ja-JP.metadata-forms.generated.ts index de2dcf4d938..3f6cd992f09 100644 --- a/packages/platform-objects/src/apps/translations/ja-JP.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/ja-JP.metadata-forms.generated.ts @@ -2829,10 +2829,6 @@ export const jaJPMetadataForms: NonNullable = label: "ツール", helpText: "ツール名(ワイルドカード対応: action_*)" }, - mcpPrompt: { - label: "MCP プロンプトとして提供", - helpText: "このスキルを MCP プロンプトとして提供します。製品内エージェント専用に書かれたプレイブック(そのツールと承認カードを前提とするもの)ではオフにしてください。オフにすると、ツールに関係なく MCP クライアントには一覧表示されません。未設定 = 提供。" - }, triggerConditions: { label: "トリガー条件", helpText: "プログラム条件(例: objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/ko.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/ko.metadata-forms.generated.ts index 0eeed526e05..83b6a3e1992 100644 --- a/packages/platform-objects/src/apps/translations/ko.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/ko.metadata-forms.generated.ts @@ -2829,10 +2829,6 @@ export const koMetadataForms: NonNullable = { label: "도구", helpText: "도구 이름(와일드카드 지원: action_*)" }, - mcpPrompt: { - label: "Offer as MCP prompt", - helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." - }, triggerConditions: { label: "트리거 조건", helpText: "프로그래밍 방식 조건(예: objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/ko.source-hashes.generated.ts b/packages/platform-objects/src/apps/translations/ko.source-hashes.generated.ts index ef3b9d2a7ad..f4542414298 100644 --- a/packages/platform-objects/src/apps/translations/ko.source-hashes.generated.ts +++ b/packages/platform-objects/src/apps/translations/ko.source-hashes.generated.ts @@ -24,8 +24,6 @@ export const koGeneratedSourceHashes: Readonly> = { "metadataForms.permission.fields.objects.helpText": "e2512cfb3b501aae", "metadataForms.permission.fields.tabPermissions.helpText": "8942e2aebe59897c", "metadataForms.position.fields.name.helpText": "3594bba7cc2a3c8a", - "metadataForms.skill.fields.mcpPrompt.helpText": "23d70850b9794ec7", - "metadataForms.skill.fields.mcpPrompt.label": "52a386069c5cc374", "objects.sys_email.fields.message_id.label": "14cd089a4062f4b1", "objects.sys_email_template.fields.id.label": "00b0385c9c152888", "objects.sys_email_template.fields.package_id.help": "e1f8cc4d0105cedc", diff --git a/packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts b/packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts index 9be8df8bbc1..b6691bf30e5 100644 --- a/packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts +++ b/packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts @@ -1286,10 +1286,7 @@ describe('#19403 round 10 — the verdicts, on the live bundles', () => { // 741 since #33657: the hook form's refusal entry offers `reasons` (with // its `message`) and `params` — three row labels, authored in all three // locales. - // 742 since #34167: the skill form offers `mcpPrompt` (the owner's - // opt-out of MCP prompt projection) — one field label, authored in all - // three locales. - expect(translated.length, `${locale} positive control`).toBe(742); + expect(translated.length, `${locale} positive control`).toBe(741); } // ⭐ DARK — the blindness, executable. On a synthetic two-locale catalog the // all-three predicate returns 0 while the per-locale one returns 1, so the diff --git a/packages/platform-objects/src/apps/translations/pt-BR.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/pt-BR.metadata-forms.generated.ts index 6c296f073e2..364cb7ba667 100644 --- a/packages/platform-objects/src/apps/translations/pt-BR.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/pt-BR.metadata-forms.generated.ts @@ -2829,10 +2829,6 @@ export const ptBRMetadataForms: NonNullable = label: "Ferramentas", helpText: "Nomes das ferramentas (aceita curinga: action_*)" }, - mcpPrompt: { - label: "Offer as MCP prompt", - helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." - }, triggerConditions: { label: "Condições de ativação", helpText: "Condições programáticas (por exemplo, objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/pt-BR.source-hashes.generated.ts b/packages/platform-objects/src/apps/translations/pt-BR.source-hashes.generated.ts index f87422ae4b5..dc8b3f44160 100644 --- a/packages/platform-objects/src/apps/translations/pt-BR.source-hashes.generated.ts +++ b/packages/platform-objects/src/apps/translations/pt-BR.source-hashes.generated.ts @@ -38,8 +38,6 @@ export const ptBRGeneratedSourceHashes: Readonly> = { "metadataForms.permission.fields.objects.helpText": "e2512cfb3b501aae", "metadataForms.permission.fields.tabPermissions.helpText": "8942e2aebe59897c", "metadataForms.position.fields.name.helpText": "3594bba7cc2a3c8a", - "metadataForms.skill.fields.mcpPrompt.helpText": "23d70850b9794ec7", - "metadataForms.skill.fields.mcpPrompt.label": "52a386069c5cc374", "metadataForms.view.fields.gantt.label": "57ffc6ef520edfc5", "metadataForms.view.fields.kanban.label": "dd95c452aa71459e", "metadataForms.view.sections.gantt.label": "57ffc6ef520edfc5", diff --git a/packages/platform-objects/src/apps/translations/ru.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/ru.metadata-forms.generated.ts index 910db48019e..ef3ff534857 100644 --- a/packages/platform-objects/src/apps/translations/ru.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/ru.metadata-forms.generated.ts @@ -2829,10 +2829,6 @@ export const ruMetadataForms: NonNullable = { label: "Инструменты", helpText: "Имена инструментов (поддерживается подстановка: action_*)" }, - mcpPrompt: { - label: "Offer as MCP prompt", - helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." - }, triggerConditions: { label: "Условия активации", helpText: "Программные условия (например, objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/ru.source-hashes.generated.ts b/packages/platform-objects/src/apps/translations/ru.source-hashes.generated.ts index 2aa56c04f0f..803c7a5c745 100644 --- a/packages/platform-objects/src/apps/translations/ru.source-hashes.generated.ts +++ b/packages/platform-objects/src/apps/translations/ru.source-hashes.generated.ts @@ -24,8 +24,6 @@ export const ruGeneratedSourceHashes: Readonly> = { "metadataForms.permission.fields.objects.helpText": "e2512cfb3b501aae", "metadataForms.permission.fields.tabPermissions.helpText": "8942e2aebe59897c", "metadataForms.position.fields.name.helpText": "3594bba7cc2a3c8a", - "metadataForms.skill.fields.mcpPrompt.helpText": "23d70850b9794ec7", - "metadataForms.skill.fields.mcpPrompt.label": "52a386069c5cc374", "objects.sys_email.fields.message_id.label": "14cd089a4062f4b1", "objects.sys_email_template.fields.id.label": "00b0385c9c152888", "objects.sys_email_template.fields.package_id.help": "e1f8cc4d0105cedc", diff --git a/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts index d24dcbcb67f..6305508ab42 100644 --- a/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts @@ -2829,10 +2829,6 @@ export const zhCNMetadataForms: NonNullable = label: "工具", helpText: "工具名(支持通配符:action_*)" }, - mcpPrompt: { - label: "作为 MCP 提示词提供", - helpText: "将此技能作为 MCP 提示词提供。若剧本只为产品内智能体编写(依赖它们的工具和审批卡片),请关闭:此后无论绑定哪些工具,都不会向 MCP 客户端列出。未设置 = 提供。" - }, triggerConditions: { label: "触发条件", helpText: "程序化条件(如 objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/zh-Hant.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/zh-Hant.metadata-forms.generated.ts index d1d104558c6..8672e220bf2 100644 --- a/packages/platform-objects/src/apps/translations/zh-Hant.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/zh-Hant.metadata-forms.generated.ts @@ -2829,10 +2829,6 @@ export const zhHantMetadataForms: NonNullable label: "工具", helpText: "工具名(支援萬用字元:action_*)" }, - mcpPrompt: { - label: "Offer as MCP prompt", - helpText: "Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered." - }, triggerConditions: { label: "觸發條件", helpText: "程式化條件(如 objectName == \"case\")" diff --git a/packages/platform-objects/src/apps/translations/zh-Hant.source-hashes.generated.ts b/packages/platform-objects/src/apps/translations/zh-Hant.source-hashes.generated.ts index 2ecfa87977d..e9a90d643c2 100644 --- a/packages/platform-objects/src/apps/translations/zh-Hant.source-hashes.generated.ts +++ b/packages/platform-objects/src/apps/translations/zh-Hant.source-hashes.generated.ts @@ -18,8 +18,6 @@ */ export const zhHantGeneratedSourceHashes: Readonly> = { - "metadataForms.skill.fields.mcpPrompt.helpText": "23d70850b9794ec7", - "metadataForms.skill.fields.mcpPrompt.label": "52a386069c5cc374", "objects.sys_email.fields.message_id.label": "14cd089a4062f4b1", "objects.sys_email_template.fields.id.label": "00b0385c9c152888", "objects.sys_exchange_rate.fields.id.label": "00b0385c9c152888", diff --git a/packages/spec/src/ai/skill.form.ts b/packages/spec/src/ai/skill.form.ts index bfcbd63478d..4bbd92086c0 100644 --- a/packages/spec/src/ai/skill.form.ts +++ b/packages/spec/src/ai/skill.form.ts @@ -37,7 +37,6 @@ export const skillForm = defineForm({ fields: [ { field: 'instructions', widget: 'textarea', helpText: 'Instructions for AI — tell it how to use these tools together' }, { field: 'tools', widget: 'string-tags', required: true, helpText: 'Tool names (supports wildcard: action_*)' }, - { field: 'mcpPrompt', label: 'Offer as MCP prompt', colSpan: 1, helpText: 'Offer this skill as an MCP prompt. Turn off for a playbook written only for the in-product agents (their tools, their approval card): it is then never listed to MCP clients, whatever its tools. Unset = offered.' }, ], }, { diff --git a/packages/spec/src/ai/skill.zod.ts b/packages/spec/src/ai/skill.zod.ts index 12d51f63f31..27ec0759d85 100644 --- a/packages/spec/src/ai/skill.zod.ts +++ b/packages/spec/src/ai/skill.zod.ts @@ -438,7 +438,9 @@ export const SkillSchema = lazySchema(() => strictObject({ * on every MCP connection and whatever its `tools` binding — even on a * connection that serves every tool it binds (`@objectstack/mcp` * `projectSkillPrompt`, which both the per-request HTTP prompt surface and the - * long-lived stdio server read). + * long-lived stdio server read). The stdio server lists its prompts once, at + * boot: a skill saved with `false` while it runs stays on that list until + * restart, but its `prompts/get` answers it as unknown at once. * * Absent or `true`: offered as before, where the server serves the tools the * skill binds (see `tools`). The key changes nothing else: the in-product diff --git a/packages/spec/src/system/metadata-form-zod-reconciliation.test.ts b/packages/spec/src/system/metadata-form-zod-reconciliation.test.ts index 5c1868dca5d..11933fba8bb 100644 --- a/packages/spec/src/system/metadata-form-zod-reconciliation.test.ts +++ b/packages/spec/src/system/metadata-form-zod-reconciliation.test.ts @@ -335,6 +335,15 @@ const LEDGER: ReadonlyArray = [ // enforced its row is stale: delete it and decide the offer then — that // decision belongs to the enforcement, not to this gate. + // A boolean whose UNSET state is the meaning, and no default to show it. + { + kind: 'omit', + type: 'skill', + path: ROOT_PATH, + key: 'mcpPrompt', + why: "unset means offered as an MCP prompt and only `false` withholds the skill, so the key's meaning lives in its absence, and it deliberately has no schema default (an undeclared skill parses byte-identical). The form's boolean control is a switch that draws unset as off, so every offered skill would read as withheld; a select writes its option value as a string, which this boolean key refuses. Authored in source or through the metadata API, where the describe text says what `false` does", + }, + // Platform-written, never authored. { kind: 'omit',