Skip to content

Conversation

@betterclever
Copy link
Contributor

Summary

  • Tool Mode Orchestration: Updated the Temporal workflow orchestrator to detect nodes in tool mode. These nodes register their metadata and credentials in the Tool Registry and pause until an agent call is received.
  • MCP Server Support: Implemented specialized handling for the core.mcp.server component, allowing workflows to dynamically include external Model Context Protocol tool sources.
  • Signal Handling: Added toolCallCompletedSignal to allow the MCP Gateway to notify waiting workflows when an autonomous agent has finished invoking a tool.
  • Internal Registry API: Added a secure internal controller in the backend for tool registration from worker activities.
  • Type Safety & Bug Fixes: Standardized orchestrator return types to { activePorts: ... } for better compatibility with the workflow scheduler and fixed a pre-existing argument bug in human input expiration.

Stacked on: #213 (ENG-98)

…ents

ENG-95

- Add PortBindingType and bindingType to ComponentPortMetadata
- Add AgentToolConfig and agentTool to ComponentUiMetadata
- Create tool-helpers.ts with isAgentCallable, getToolSchema, getCredentialInputIds, getActionInputIds, getToolName, getToolDescription, getToolMetadata
- Add comprehensive tests for all helper functions (14 tests)

Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ca7a7e610

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


export const RegisterToolRequestSchema = z.object({
runId: z.string(),
nodeId: z.string(),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Align tool registration node identifier field

RegisterToolRequestSchema requires nodeId, but the worker’s registerToolActivity posts RegisterToolActivityInput with nodeRef (sent verbatim in the JSON body). Because nodeId is missing, the Zod validation will reject the request and tool registrations will 400, so tool-mode nodes never get stored in the registry. The backend should accept nodeRef (or the worker should send nodeId) so the internal endpoint can validate successfully.

Useful? React with 👍 / 👎.

Comment on lines 88 to 90
const result = await component.execute(
{ inputs: mergedInputs as any, params: {} as any },
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use node parameters when executing component tools

callComponentTool invokes component.execute with params: {}, which drops the workflow node’s configured parameters. Any tool backed by a component that depends on params (for example core.mcp.tools.http requires endpoint) will execute with undefined/default values and produce incorrect results or failures. This should load the node params from the run/version (or persist them in the registry) and pass them into execute just like the normal workflow runner does.

Useful? React with 👍 / 👎.

Comment on lines +69 to +73
async execute() {
// The Docker runner handles execution.
// At runtime, the workflow engine will resolve the dynamic endpoint.
return {
endpoint: 'http://localhost:8080', // Placeholder

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Start MCP server instead of returning placeholder

core.mcp.server.execute returns a hard-coded http://localhost:8080 and never invokes the Docker runner, so no MCP server container is actually launched. Workflows that use this component will try to connect to a non-existent endpoint. This component needs to call runComponentWithRunner (or otherwise start the container) and return the real bound endpoint instead of a placeholder.

Useful? React with 👍 / 👎.

…itecture

Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
ENG-96

- Create ToolRegistryService with Redis-backed storage
- Implement registerComponentTool, registerRemoteMcp, registerLocalMcp
- Implement getToolsForRun, getTool, getToolByName, getToolCredentials
- Implement areAllToolsReady for agent readiness check
- Implement cleanupRun for workflow completion cleanup
- Encrypt credentials using existing SecretsEncryptionService
- Redis key pattern: mcp:run:{runId}:tools (Hash, TTL 1hr)
- Add McpModule to app imports
- Add comprehensive tests (8 tests passing)

Note: Temporal activities (registerToolActivity, waitForToolsActivity, etc.)
will be added in a follow-up as they reside in the worker package.

Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
@betterclever betterclever force-pushed the eng-99/temporal-tool-mode branch from 9ca7a7e to 3b44d78 Compare January 19, 2026 13:02
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
@betterclever betterclever force-pushed the eng-99/temporal-tool-mode branch from 3b44d78 to c513293 Compare January 19, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants