Skip to content

feat(api): publish agent tool input schema - #7109

Merged
TheodoreSpeaks merged 2 commits into
stagingfrom
feat/agent-tool-openapi-schema
Aug 26, 2026
Merged

feat(api): publish agent tool input schema#7109
TheodoreSpeaks merged 2 commits into
stagingfrom
feat/agent-tool-openapi-schema

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

  • publish Agent tool inputs as named OpenAPI components for catalog integrations, custom tools, and MCP tools
  • validate and generate typed inputs.tools shapes for workflow operations while preserving open block inputs

Type of Change

  • New feature

Testing

  • bun run lint
  • bun run check:audits
  • focused Agent tool contract tests

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 26, 2026 6:32pm

Request Review

@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR publishes named OpenAPI components for Agent integration, custom, and MCP tool inputs and applies that validation to workflow add, edit, and subflow-insert operations.

  • Adds runtime Zod contracts and generated OpenAPI/CLI representations for Agent tools.
  • Preserves open block-specific inputs while assigning a typed shape to inputs.tools.
  • Adds focused contract and OpenAPI-generation coverage.

Confidence Score: 4/5

The PR appears safe to merge, with a non-blocking need to add the repository-required bounds to the newly exposed Agent tool boundary schemas.

The tool variants and operation wiring are consistent with current stored shapes, but the new tools array and several identifier/name fields publish no upper bounds.

Files Needing Attention: apps/sim/lib/api/contracts/v2/workflows.ts

Important Files Changed

Filename Overview
apps/sim/lib/api/contracts/v2/workflows.ts Adds the Agent tool schemas and operation-input wiring; the new boundary fields omit repository-required collection and string maximum bounds.
apps/sim/lib/api/contracts/v2/tests/workflow-agent-tools.test.ts Covers accepted integration, custom, legacy-inline, and MCP shapes plus malformed reserved tool rejection.
apps/sim/lib/api/contracts/v2/openapi/workflows.ts Documents Agent inputs.tools as the typed exception within otherwise open catalog-defined block inputs.
packages/sim-cli/src/generated/v2-api.ts Projects the new Agent tool union into generated TypeScript operation-body types.
apps/docs/openapi-v2-workflows.json Regenerates the workflows OpenAPI document with named Agent tool components and operation references.
scripts/openapi/documents.test.ts Verifies named tool variants and their inclusion in WorkflowEditOperation.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Request[Workflow operation request] --> Operation{Operation type}
  Operation -->|add/edit/insert| Inputs[Open block inputs]
  Inputs --> Tools[Typed inputs.tools]
  Tools --> Integration[Integration tool]
  Tools --> Custom[Custom tool]
  Tools --> MCP[MCP tool]
  Tools --> OpenAPI[Named OpenAPI components]
  OpenAPI --> CLI[Generated CLI types]
Loading

Reviews (1): Last reviewed commit: "feat(api): publish agent tool input sche..." | Re-trigger Greptile

Comment on lines +2825 to +2826
export const v2AgentToolInputSchema = z
.array(v2AgentToolSchema)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Bound Agent tool inputs

The new tools array and the inline function name, MCP server ID, and MCP tool name omit the repository-required upper bounds, publishing weaker API limits and allowing unnecessarily large workflow-operation payloads.

Context Used: CLAUDE.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@TheodoreSpeaks
TheodoreSpeaks merged commit d86fdc1 into staging Aug 26, 2026
28 checks passed
@TheodoreSpeaks
TheodoreSpeaks deleted the feat/agent-tool-openapi-schema branch August 26, 2026 18:37
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.

1 participant