INNER CODE UNIT · TypeScript

getBackendTools

eclaire-labs/eclaire · apps/backend/src/lib/agent/tools/index.ts:134

export function getBackendTools(): Record<string, RuntimeToolDefinition> {
  const tools: Record<string, RuntimeToolDefinition> = { ...staticTools };

  // Merge MCP-sourced tools
  try {
    const mcpTools = getMcpRegistry().getMcpTools();
    Object.assign(tools, mcpTools);
  } catch {
    // Registry not yet initialized (e.g. during import-time access)
  }

  // Merge audio tools if audio service is available
  if (isAudioAvailable()) {
    tools.transcribeAudio = transcribeAudioTool;
    tools.synthesizeSpeech = synthesizeSpeechTool;
  }

  return tools;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…