Problem
UpdateContentStandardsResponse has optional standards_id?: string and errors?: Error[] on a single flat type. An agent cannot determine success vs. failure by structural inspection — it must check whether errors is present and non-empty.
Every other write operation in the protocol uses strict discriminated unions:
CreateContentStandardsResponse: CreateContentStandardsSuccess | CreateContentStandardsError
CalibrateContentResponse: CalibrateContentSuccess | CalibrateContentError
CreateMediaBuyResponse: CreateMediaBuySuccess | CreateMediaBuyError
- etc.
This inconsistency breaks agents that handle all write responses with the same structural pattern.
Proposed fix
Replace UpdateContentStandardsResponse with a discriminated union matching the established protocol pattern:
type UpdateContentStandardsResponse = UpdateContentStandardsSuccess | UpdateContentStandardsError;
interface UpdateContentStandardsSuccess {
success: true;
standards_id: string;
// updated standards object
}
interface UpdateContentStandardsError {
success: false;
errors: Error[];
}
Problem
UpdateContentStandardsResponsehas optionalstandards_id?: stringanderrors?: Error[]on a single flat type. An agent cannot determine success vs. failure by structural inspection — it must check whethererrorsis present and non-empty.Every other write operation in the protocol uses strict discriminated unions:
CreateContentStandardsResponse:CreateContentStandardsSuccess | CreateContentStandardsErrorCalibrateContentResponse:CalibrateContentSuccess | CalibrateContentErrorCreateMediaBuyResponse:CreateMediaBuySuccess | CreateMediaBuyErrorThis inconsistency breaks agents that handle all write responses with the same structural pattern.
Proposed fix
Replace
UpdateContentStandardsResponsewith a discriminated union matching the established protocol pattern: