feat: choose per tool whether MCP, voice or both offer it

src/tools/surfaces.js lists the tools a surface leaves out, and the MCP
server, the voice session's tool list and the browser catalog voice calls
all filter through it. Voice leaves out tools that answer with images, link
to the app, or repeat what its app actions already answer.
This commit is contained in:
Sameh Khamis committed 2026-10-01 14:36:12 -07:00
1 parent b4067f9859
commit df0e0f32e8
9 files changed
+138 -17

No files matched your search

+8 -6
View File
@@ -1,16 +1,18 @@
/**
* The voice session's tools for the standalone server: the app actions plus
* Core's catalog queries, which the browser runs through the same catalog.
* Links to the app are left out, since voice runs inside it.
* the catalog tools voice offers (see src/tools/surfaces.js), which the
* browser runs through the same catalog.
*/
import { coreTools, toFunctionTools } from '../../src/tools/index.js';
import {
coreTools,
toFunctionTools,
toolsForSurface,
} from '../../src/tools/index.js';
import { realtimeSessionTools } from '../providers/openai/tools.js';
export const VOICE_EXCLUDED_QUERIES = Object.freeze(['open_in_gods_eye_view']);
export function standaloneVoiceTools() {
return realtimeSessionTools(
toFunctionTools(coreTools, { exclude: VOICE_EXCLUDED_QUERIES }),
toFunctionTools(toolsForSurface(coreTools, 'voice')),
);
}