Skip to content

Commit c6e147e

Browse files
authored
feat(agent): add MCP server discovery mode for agent tool input (#3353)
* feat(agent): add MCP server discovery mode for agent tool input * fix(tool-input): use type variant for MCP server tool count badge * fix(mcp-dynamic-args): align label styling with standard subblock labels * standardized inp format UI * feat(tool-input): replace MCP server inline expand with drill-down navigation * feat(tool-input): add chevron affordance and keyboard nav for MCP server drill-down * fix(tool-input): handle mcp-server type in refresh, validation, badges, and usage control * refactor(tool-validation): extract getMcpServerIssue, remove fake tool hack * lint * reorder dropdown * perf(agent): parallelize MCP server tool creation with Promise.all * fix(combobox): preserve cursor movement in search input, reset query on drilldown * fix(combobox): route ArrowRight through handleSelect, remove redundant type guards * fix(agent): rename mcpServers to mcpServerSelections to avoid shadowing DB import, route ArrowRight through handleSelect * docs: update google integration docs * fix(tool-input): reset drilldown state on tool selection to prevent stale view * perf(agent): parallelize MCP server discovery across multiple servers
1 parent 345a95f commit c6e147e

File tree

21 files changed

+562
-189
lines changed

21 files changed

+562
-189
lines changed

apps/docs/content/docs/en/tools/google_translate.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
1010
color="#E0E0E0"
1111
/>
1212

13+
{/* MANUAL-CONTENT-START:intro */}
14+
[Google Translate](https://translate.google.com/) is Google's powerful translation service, supporting over 100 languages for text, documents, and websites. Backed by advanced neural machine translation, Google Translate delivers fast and accurate translations for a wide range of use cases, from casual communication to professional workflows.
15+
16+
In Sim, the Google Translate integration allows your agents to translate text and detect languages as part of automated workflows. Agents can translate content between languages, auto-detect source languages, and process multilingual data—all without manual intervention. By connecting Sim with Google Cloud Translation, you can build intelligent workflows that handle localization, multilingual support, content translation, and language detection at scale.
17+
{/* MANUAL-CONTENT-END */}
18+
19+
1320
## Usage Instructions
1421

1522
Translate and detect languages using the Google Cloud Translation API. Supports auto-detection of the source language.

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/api-info-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ export function ApiInfoModal({ open, onOpenChange, workflowId }: ApiInfoModalPro
268268
</Badge>
269269
</div>
270270
</div>
271-
<div className='border-[var(--border-1)] border-t px-[10px] pt-[6px] pb-[10px]'>
271+
<div className='rounded-b-[4px] border-[var(--border-1)] border-t bg-[var(--surface-2)] px-[10px] pt-[6px] pb-[10px]'>
272272
<div className='flex flex-col gap-[6px]'>
273273
<Label className='text-[13px]'>Description</Label>
274274
<Input

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/mcp/mcp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ export function McpDeploy({
547547
</Badge>
548548
</div>
549549
</div>
550-
<div className='border-[var(--border-1)] border-t px-[10px] pt-[6px] pb-[10px]'>
550+
<div className='rounded-b-[4px] border-[var(--border-1)] border-t bg-[var(--surface-2)] px-[10px] pt-[6px] pb-[10px]'>
551551
<div className='flex flex-col gap-[6px]'>
552552
<Label className='text-[13px]'>Description</Label>
553553
<Input

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/document-tag-entry/document-tag-entry.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ export function DocumentTagEntry({
367367
}))
368368

369369
return (
370-
<div className='flex flex-col gap-[8px] border-[var(--border-1)] border-t px-[10px] pt-[6px] pb-[10px]'>
370+
<div className='flex flex-col gap-[8px] rounded-b-[4px] border-[var(--border-1)] border-t bg-[var(--surface-2)] px-[10px] pt-[6px] pb-[10px]'>
371371
<div className='flex flex-col gap-[6px]'>
372372
<Label className='text-[13px]'>Tag</Label>
373373
<Combobox

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/filter-builder/components/filter-rule-row.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export function FilterRuleRow({
165165
)
166166

167167
const renderContent = () => (
168-
<div className='flex flex-col gap-[8px] border-[var(--border-1)] border-t px-[10px] pt-[6px] pb-[10px]'>
168+
<div className='flex flex-col gap-[8px] rounded-b-[4px] border-[var(--border-1)] border-t bg-[var(--surface-2)] px-[10px] pt-[6px] pb-[10px]'>
169169
{index > 0 && (
170170
<div className='flex flex-col gap-[6px]'>
171171
<Label className='text-[13px]'>Logic</Label>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/input-mapping/input-mapping.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ function InputMappingField({
239239
</div>
240240

241241
{!collapsed && (
242-
<div className='flex flex-col gap-[8px] border-[var(--border-1)] border-t px-[10px] pt-[6px] pb-[10px]'>
242+
<div className='flex flex-col gap-[8px] rounded-b-[4px] border-[var(--border-1)] border-t bg-[var(--surface-2)] px-[10px] pt-[6px] pb-[10px]'>
243243
<div className='flex flex-col gap-[6px]'>
244244
<Label className='text-[13px]'>Value</Label>
245245
<div className='relative'>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/knowledge-tag-filters/knowledge-tag-filters.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ export function KnowledgeTagFilters({
358358
const isBetween = filter.operator === 'between'
359359

360360
return (
361-
<div className='flex flex-col gap-[8px] border-[var(--border-1)] border-t px-[10px] pt-[6px] pb-[10px]'>
361+
<div className='flex flex-col gap-[8px] rounded-b-[4px] border-[var(--border-1)] border-t bg-[var(--surface-2)] px-[10px] pt-[6px] pb-[10px]'>
362362
<div className='flex flex-col gap-[6px]'>
363363
<Label className='text-[13px]'>Tag</Label>
364364
<Combobox

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-dynamic-args/mcp-dynamic-args.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { useCallback, useMemo } from 'react'
22
import { createLogger } from '@sim/logger'
33
import { useParams } from 'next/navigation'
44
import { Combobox, Label, Slider, Switch } from '@/components/emcn/components'
5-
import { cn } from '@/lib/core/utils/cn'
65
import { LongInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input'
76
import { ShortInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input'
87
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
@@ -147,7 +146,7 @@ export function McpDynamicArgs({
147146
/>
148147
<Label
149148
htmlFor={`${paramName}-switch`}
150-
className='cursor-pointer font-normal text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70'
149+
className='cursor-pointer font-normal leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70'
151150
>
152151
{formatParameterLabel(paramName)}
153152
</Label>
@@ -351,15 +350,14 @@ export function McpDynamicArgs({
351350
<div key={paramName} className='subblock-row'>
352351
<div className='subblock-content flex flex-col gap-[10px]'>
353352
{showLabel && (
354-
<Label
355-
className={cn(
356-
'font-medium text-sm',
357-
toolSchema.required?.includes(paramName) &&
358-
'after:ml-1 after:text-red-500 after:content-["*"]'
359-
)}
360-
>
361-
{formatParameterLabel(paramName)}
362-
</Label>
353+
<div className='flex items-center justify-between gap-[6px] pl-[2px]'>
354+
<Label className='flex items-baseline gap-[6px] whitespace-nowrap'>
355+
{formatParameterLabel(paramName)}
356+
{toolSchema.required?.includes(paramName) && (
357+
<span className='ml-0.5'>*</span>
358+
)}
359+
</Label>
360+
</div>
363361
)}
364362
{renderParameterInput(paramName, paramSchema as any)}
365363
</div>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/sort-builder/components/sort-rule-row.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function SortRuleRow({
7070
)
7171

7272
const renderContent = () => (
73-
<div className='flex flex-col gap-[8px] border-[var(--border-1)] border-t px-[10px] pt-[6px] pb-[10px]'>
73+
<div className='flex flex-col gap-[8px] rounded-b-[4px] border-[var(--border-1)] border-t bg-[var(--surface-2)] px-[10px] pt-[6px] pb-[10px]'>
7474
<div className='flex flex-col gap-[6px]'>
7575
<Label className='text-[13px]'>Column</Label>
7676
<Combobox

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/starter/input-format.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ export function FieldFormat({
552552
{renderFieldHeader(field, index)}
553553

554554
{!field.collapsed && (
555-
<div className='flex flex-col gap-[8px] border-[var(--border-1)] border-t px-[10px] pt-[6px] pb-[10px]'>
555+
<div className='flex flex-col gap-[8px] rounded-b-[4px] border-[var(--border-1)] border-t bg-[var(--surface-2)] px-[10px] pt-[6px] pb-[10px]'>
556556
<div className='flex flex-col gap-[6px]'>
557557
<Label className='text-[13px]'>Name</Label>
558558
<div className='relative'>{renderNameInput(field)}</div>

0 commit comments

Comments
 (0)