Scope MCP server reads to the calling application and seed optional tool inputs with null
Merged
AB
15h ago+232+232+012345678901234567890123456789-13-13-01234567890123456789
What
Two follow-ups from the review of #29668.
mcpServersandmcpServerreads now only return servers whose application the caller can reach (canCallerReachApplicationwith thereadoperation, like the logic function, front component and agent reads). An application token sees its own servers; sessions, API keys and the workspace custom application see all of them. The reads still need no permission flag, since the workflow picker lists from them, as will the upcoming MCP servers settings page, and the catalog exposes no secrets. Mutations are unchanged behindAPI_KEYS_AND_WEBHOOKS.- Optional tool inputs are seeded with
nullinstead of[]or the first enum value, throughgetDefaultMcpToolInputFromJsonSchemaintwenty-shared, both when the server builds the step from the picker and when the editor merges the tool's schema into saved settings. Every field of the schema shows in the form, and an unset optional value is an explicitnullthat the server strips before calling the tool. Required fields get[]for arrays, the first value for enums, andnullotherwise. Required fields inside an optional object staynull, so an untouched optional object is left out of the call.
Test
getDefaultMcpToolInputFromJsonSchemaunit spec: required fields get their default, optional onesnull, and required fields inside an optional object staynull.- Step operations spec: a picker-created
MCP_TOOLstep storesnullfor an untouched optional input. It fails against the old seeding. - Typecheck, lint and unit tests green in CI on server, front and shared.