feat(codeflows): defineTool Zod→OpenAPI custom tools primitive - #6
Draft
DumbMachine wants to merge 8 commits into
Draft
feat(codeflows): defineTool Zod→OpenAPI custom tools primitive#6DumbMachine wants to merge 8 commits into
DumbMachine wants to merge 8 commits into
Conversation
Custom tools are portable TypeScript modules deployed like workflows and invoked from workflows via client.tool(name).invoke(input). They appear on the Resources Tools tab with describe APIs for agent DX, and are executed through the same brokered operation path without worker credentials. Co-authored-by: Ratin Kumar <ratin.kumar.2k@gmail.com>
Ship example Twitter tools + company-research workflow, with bootstrap and screenshot scripts so the full tools→workflow→run UX can be reproduced via make custom-tools-demo. Co-authored-by: Ratin Kumar <ratin.kumar.2k@gmail.com>
Co-authored-by: Ratin Kumar <ratin.kumar.2k@gmail.com>
Merge latest codeflows-mvp design and restyle Tools inventory + Tool detail to match DataTable / ChromeTab / flat MetaCell patterns. Co-authored-by: Ratin Kumar <ratin.kumar.2k@gmail.com>
Resources Integrations/Tools use ChromeTabList; tools inventory rows mirror workflows (entry subtitle, project, retire menu); tool detail uses workflow-style meta band, flat copy block, and FileRenderer source. Co-authored-by: Ratin Kumar <ratin.kumar.2k@gmail.com>
ChromeTabList belongs on detail pages. Integrations/Tools now use the same FilterBar segment switch as Agents Mine/Shared so list chrome matches codeflows-mvp. Co-authored-by: Ratin Kumar <ratin.kumar.2k@gmail.com>
Drop mx-auto/max-w-5xl so Overview and Source use the full content width like workflow Activity/Files. Co-authored-by: Ratin Kumar <ratin.kumar.2k@gmail.com>
Author tools with @access/tools defineTool; deploy persists OpenAPI and parameters so MCP discover/describe/execute reuse the same rest_api-shaped operation surface for agents and workflows. Co-authored-by: Ratin Kumar <ratin.kumar.2k@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Custom tools are authored with
@access/toolsdefineToolwhere Zod is the authoring primitive and OpenAPI is the wire. Deploy persistsparameters+ a mini OpenAPI 3 doc; MCP reuses the samediscover/describe/executesurface agents already use forrest_api.Authoring
Agent / MCP contract
discover(kind="tool")— lists deployed toolsdescribe(kind="integration", slug="tool")— argv grammardescribe(kind="resource", slug="<tool>")— OpenAPI ops (invoke)describe(..., query="invoke")— Zod→OpenAPIinput_schemaexecute({ resource, argv: ["http","invoke"], stdin })— same shape as rest_apiclient.tool("name").invoke(input)Implementation
sdk/tools(defineTool+ Zod 4toJSONSchematargetopenapi-3.0)@access/toolsvirtual module)export const toolstill upgrades to OpenAPItools_custom.go+ ToolBroker wired intomcpServer()defineToolUI (prior)
Screenshots
Tools list
Tools list
Tool detail
Tool detail
Tool source
Tool source
Workflow using tools
Workflow activity
Test plan
go test ./core/codeflows/ ./core/mcpserver/export const toolstill deploysTo show artifacts inline, enable in settings.