Skip to content

Improve MCP tool contracts and agent guidance - #3

Open
awantoch wants to merge 1 commit into
codex/mcp-sdk-v2from
codex/mcp-tool-best-practices
Open

Improve MCP tool contracts and agent guidance#3
awantoch wants to merge 1 commit into
codex/mcp-sdk-v2from
codex/mcp-tool-best-practices

Conversation

@awantoch

@awantoch awantoch commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add described, bounded input schemas and typed success output schemas across all 45 MCP tools
  • replace static workflow-guide tools with concise server instructions and accurate create/update/delete annotations
  • expose atomic process-flow node and edge batch mutations plus deterministic autolayout
  • return compact tool text and keep raw database diagnostics out of model-visible errors
  • add contract tests and authenticated MCP v2 transport E2E coverage for catalog metadata, typed reads, batch mutation, and autolayout

Verification

  • npm run typecheck
  • npm run lint
  • npm test — 95 files, 435 tests passed
  • npm run build
  • npx playwright test e2e/mcp.spec.ts — 1 passed
  • npm run test:e2e — 15 passed

Stack

This PR is intentionally based on #2 and should merge after it.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T08:06:35.895738Z 9923924 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9923924f97

ℹ️ 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".

const MAX_TEXT_LENGTH = 20_000;
const MAX_MARKDOWN_LENGTH = 100_000;
const MAX_COLLECTION_ITEMS = 200;
const MAX_BATCH_MUTATIONS = 100;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve bulk deletion for large process flows

When a diagram has more than 100 selected nodes or edges, this shared cap also applies to the existing REST request schemas because batchProcessFlowNodesBodySchema and batchProcessFlowEdgesBodySchema are derived from the capped schemas. ProcessFlowScreen.handleNodesDelete and handleEdgesDelete send the entire selected set as one mutation array without chunking, so a bulk deletion that previously reached the atomic RPC now receives a validation error and deletes nothing. Keep this limit MCP-specific, or update the UI/API flow to handle larger selections.

Useful? React with 👍 / 👎.

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