Skip to content

feat(teams): add variables and MCP tool filter#25

Merged
vitramir merged 2 commits intomainfrom
noa/issue-24
Mar 13, 2026
Merged

feat(teams): add variables and MCP tool filter#25
vitramir merged 2 commits intomainfrom
noa/issue-24

Conversation

@casey-brooks
Copy link
Contributor

Summary

  • add Variable entity definitions and CRUD/resolve RPCs in teams proto
  • add Variables schemas and endpoints to the team OpenAPI spec
  • extend MCP server config with tool filter support

Testing

  • buf lint
  • buf build
  • $(npm config get prefix)/bin/redocly bundle openapi/team/v1/openapi.yaml -o dist/team-v1.yaml
  • $(npm config get prefix)/bin/redocly bundle openapi/files/v1/openapi.yaml -o dist/files-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/team-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/files-v1.yaml

Related #24

@casey-brooks casey-brooks requested a review from a team as a code owner March 13, 2026 13:12
@github-actions
Copy link

github-actions bot commented Mar 13, 2026

The latest Buf updates on your PR. Results from workflow buf-pr / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 13, 2026, 1:27 PM

@casey-brooks
Copy link
Contributor Author

Test & Lint Summary

Commands:

  • buf lint
  • buf build
  • $(npm config get prefix)/bin/redocly bundle openapi/team/v1/openapi.yaml -o dist/team-v1.yaml
  • $(npm config get prefix)/bin/redocly bundle openapi/files/v1/openapi.yaml -o dist/files-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/team-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/files-v1.yaml

Tests: passed 2, failed 0, skipped 0.
Lint: spectral reported 0 errors (team: 71 warnings, files: 4 warnings).

@rowan-stein
Copy link
Collaborator

Ready for review

Adds two features to the Teams proto and OpenAPI schemas:

1. Variables entity

  • Proto: Variable message + 6 RPCs (CRUD + ResolveVariable for key-based lookup)
  • ENTITY_TYPE_VARIABLE = 6 added to enum
  • OpenAPI: Variable schemas, paginated list, CRUD paths, resolve-by-key path
  • No AttachmentKind needed (variables are team-global)

2. MCP tool filter config

  • Proto: McpToolFilterMode enum (ALLOW/DENY), McpToolFilterRule, McpToolFilter messages
  • tool_filter field added to McpServerConfig
  • OpenAPI: toolFilter object added to McpServerConfig.yaml

CI: buf lint ✅, buf build ✅, spectral validate ✅

Copy link

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

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

The Variable entity and MCP tool filter additions are well-structured and follow the proto and OpenAPI patterns cleanly overall. The CRUD RPCs, path definitions, and pagination schemas are all consistent.

One major issue: Variable.yaml uses a nested meta property instead of the allOf composition pattern used by every other entity schema. This would produce a different JSON shape for consumers and must be aligned.

Two minor items on toolFilter required fields and resolve response semantics — see inline comments.

@casey-brooks
Copy link
Contributor Author

Summary

  • updated Variable schema to use EntityMeta composition
  • required toolFilter mode in McpServerConfig
  • made variable resolve value optional with a clarifying description

Test & Lint Summary

Commands:

  • buf lint
  • buf build
  • $(npm config get prefix)/bin/redocly bundle openapi/team/v1/openapi.yaml -o dist/team-v1.yaml
  • $(npm config get prefix)/bin/redocly bundle openapi/files/v1/openapi.yaml -o dist/files-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/team-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/files-v1.yaml

Tests: passed 2, failed 0, skipped 0.
Lint: buf lint clean; spectral 0 errors (team: 71 warnings, files: 4 warnings).

Copy link

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

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

All three prior comments verified as resolved in code:

  1. Variable.yaml — now uses allOf composition with EntityMeta.yaml, consistent with all other entity schemas. ✅
  2. McpServerConfig.yamlrequired: [mode] added to toolFilter. ✅
  3. variable-resolve.yamlvalue removed from required, description added. ✅

Proto definitions, OpenAPI schemas, and path specs are clean and consistent. LGTM.

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.

4 participants