diff --git a/codex-rs/core/src/tools/code_mode_description_tests.rs b/codex-rs/core/src/tools/code_mode_description_tests.rs index 034a1e3f32..e32f81957e 100644 --- a/codex-rs/core/src/tools/code_mode_description_tests.rs +++ b/codex-rs/core/src/tools/code_mode_description_tests.rs @@ -85,7 +85,7 @@ fn append_code_mode_sample_uses_global_tools_for_valid_identifiers() { "{ foo: string }".to_string(), "unknown".to_string(), ), - "desc\n\nexec tool declaration:\n```ts\ndeclare const tools: { mcp__ologs__get_profile(args: { foo: string }): Promise; };\n```" + "desc\n\nexec tool declaration:\n```ts\ndeclare const functions: { mcp__ologs__get_profile(args: { foo: string }): Promise; };\n```" ); } @@ -99,6 +99,6 @@ fn append_code_mode_sample_normalizes_invalid_identifiers() { "{ foo: string }".to_string(), "unknown".to_string(), ), - "desc\n\nexec tool declaration:\n```ts\ndeclare const tools: { mcp__rmcp__echo_tool(args: { foo: string }): Promise; };\n```" + "desc\n\nexec tool declaration:\n```ts\ndeclare const functions: { mcp__rmcp__echo_tool(args: { foo: string }): Promise; };\n```" ); } diff --git a/codex-rs/core/src/tools/spec_tests.rs b/codex-rs/core/src/tools/spec_tests.rs index b62407778f..864ef4e82d 100644 --- a/codex-rs/core/src/tools/spec_tests.rs +++ b/codex-rs/core/src/tools/spec_tests.rs @@ -2967,7 +2967,7 @@ fn code_mode_augments_builtin_tool_descriptions_with_typed_sample() { assert_eq!( description, - "View a local image from the filesystem (only use if given a full filepath by the user, and the image isn't already attached to the thread context within tags).\n\nexec tool declaration:\n```ts\ndeclare const tools: { view_image(args: { path: string; }): Promise<{ detail: string | null; image_url: string; }>; };\n```" + "View a local image from the filesystem (only use if given a full filepath by the user, and the image isn't already attached to the thread context within tags).\n\nexec tool declaration:\n```ts\ndeclare const functions: { view_image(args: { path: string; }): Promise<{ detail: string | null; image_url: string; }>; };\n```" ); } @@ -3019,7 +3019,7 @@ fn code_mode_augments_mcp_tool_descriptions_with_namespaced_sample() { assert_eq!( description, - "Echo text\n\nexec tool declaration:\n```ts\ndeclare const tools: { mcp__sample__echo(args: { message: string; }): Promise<{ _meta?: unknown; content: Array; isError?: boolean; structuredContent?: unknown; }>; };\n```" + "Echo text\n\nexec tool declaration:\n```ts\ndeclare const functions: { mcp__sample__echo(args: { message: string; }): Promise<{ _meta?: unknown; content: Array; isError?: boolean; structuredContent?: unknown; }>; };\n```" ); }