Skip to content

Upgrade to SDK v0.2.19: resource type tools, dependency visibility, and new list filters - #13

Open
chrisghill wants to merge 1 commit into
mainfrom
sdk-v0.2.19-resource-types-and-dependencies
Open

Upgrade to SDK v0.2.19: resource type tools, dependency visibility, and new list filters#13
chrisghill wants to merge 1 commit into
mainfrom
sdk-v0.2.19-resource-types-and-dependencies

Conversation

@chrisghill

@chrisghill chrisghill commented Aug 27, 2026

Copy link
Copy Markdown
Member

Picks up massdriver-sdk-go v0.2.19 and surfaces the new resource type and dependency APIs as tools.

New tools

  • get_resource_type — returns the JSON schema a create_resource payload must satisfy, plus uiSchema, markdown import instructions, connectionOrientation, and effectiveAttributes. Previously create_resource took a payload with no way to discover its shape. Accepts version pinning (aws-iam-role@1.2.3, @~1, @latest).
  • list_resource_type_dependents — blast radius within an environment, one entry per (instance, dependency field) pair.
  • list_unfulfilled_dependencies — required inputs nothing fills (no link, no remote reference, no environment default). Makes a blocked deploy_environment diagnosable; points at link_components, set_remote_reference, and set_environment_default as the fixes.
  • list_environment_links — the subset of a project's blueprint links actually in effect, given the versions each environment runs.
  • get_organization_settings / update_organization_settingsdefaultBundleAccess, enum-constrained to NONE / ALL_PROJECTS.

Removed

create_service_account — the create mutation mints a bearer credential and returns it in the response. The tool, handler, Create interface method, and registration are gone. No access-token tools were added either, despite the SDK splitting Create into CreatePersonal / CreateServiceAccountToken.

New list filters

  • attributes on list_resources, list_oci_repos, list_instances
  • created_after / created_before on list_resources, list_oci_repos, list_projects

Timestamps parse as RFC 3339; a malformed bound errors rather than silently dropping the filter and widening the result set.

Description updates

@version pinning on create_resource and list_resources; artifact_type now covering resource types as well as bundles; link version constraints on get_component; OCI repo name limit 53 → 100 chars, enforced as maxLength.

Also

Fixes the v0.2.19 rename of serviceaccounts.CreatedServiceAccountWithToken, which broke the build on the bare dependency bump.

Notes

organizations.Settings ships without JSON tags, so it would serialize as {"DefaultBundleAccess": ...}. Wrapped in a local type to emit defaultBundleAccess — worth an upstream SDK fix so the wrapper can go away.

Testing

go build, go vet, gofmt, and go test ./... all clean. New tests cover each new handler, filter forwarding on all four list tools, and the two new helpers. Both README tool indexes updated; section counts sum to 111.

…nd new list filters

Adds tools for the resource type catalog and the connection system, and drops
service account creation.

New tools:
- get_resource_type: returns the JSON schema a create_resource payload must
  satisfy, plus uiSchema, markdown import instructions, connection orientation,
  and effective attributes. Accepts version pinning (@1.2.3, @~1, @latest).
- list_resource_type_dependents: what depends on a resource type in an
  environment, one entry per (instance, dependency field) pair.
- list_unfulfilled_dependencies: required inputs nothing fills, so a blocked
  deploy is diagnosable.
- list_environment_links: the links in effect given the versions each
  environment actually runs.
- get_organization_settings / update_organization_settings.

Removed create_service_account. It mints a bearer credential and returns it in
the response, which does not belong behind a tool call.

List filters: attributes on list_resources, list_oci_repos, and list_instances;
created_after/created_before on list_resources, list_oci_repos, and
list_projects. Timestamps parse as RFC 3339 and a malformed bound errors rather
than silently widening the result set.

Also fixes the v0.2.19 rename of serviceaccounts.Created to
ServiceAccountWithToken, which broke the build.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chrisghill

Copy link
Copy Markdown
Member Author

@claude review

@claude

claude Bot commented Aug 27, 2026

Copy link
Copy Markdown

Claude finished @chrisghill's task in 1m 41s —— View job


Review complete

  • Gather context (CLAUDE.md, diff, changed files)
  • Review new tools (resource_types, environments, organizations)
  • Review list filter changes (resources, oci_repos, instances, projects)
  • Review removed service_accounts code
  • Review helpers/tests
  • Post final review

This is a clean, well-scoped SDK bump. The new tools follow existing conventions closely (error wrapping with the tool name prefix, jsonResultStripping(..., "icon") where the underlying type carries an icon blob, applyAnnotations/applyEnums/applyMaxLengths wiring in metadata.go, and a stub-based test per handler). The service_accounts.CreatedServiceAccountWithToken rename fix and the removal of create_service_account are both handled consistently across server.go, services.go, metadata.go, main_test.go, structured_content_test.go, and schema_required_test.go — nothing was left dangling.

Bug: MCP_README.md's tool count header wasn't updated

MCP_README.md:3 still reads:

This document describes all 106 tools available in the Massdriver MCP server.

but mcp/server.go now registers 111 tools (grep -c "mcpsdk.AddTool" mcp/server.go → 111), matching the count README.md's "Available Tools (111)" header and the wantTools = 111 guard in mcp/tools/schema_required_test.go already reflect. The PR description says "section counts sum to 111," which is true for the per-section table, but the document's intro line was missed.

Fix this →

Other observations (no action needed, just confirming intentional design):

  • list_environment_links returns raw jsonResult (no icon stripping) while get_resource_type / list_resource_type_dependents strip icon. This is consistent with get_component, which also returns Link objects via plain jsonResult — links don't carry an icon field, so this isn't an inconsistency.
  • update_organization_settings's default_bundle_access enum constraint (NONE/ALL_PROJECTS) is wired through applyEnums() in metadata.go:156, matching the PR description's claim.
  • The OrganizationSettings wrapper struct working around the SDK's untagged organizations.Settings is a reasonable, minimal shim, and the PR body correctly flags it as removable once fixed upstream.

Not verified: go build, go vet, go test ./..., and gofmt could not be run in this sandbox — go commands require approval that wasn't available in this review context. The code changes read as internally consistent (interfaces, stubs, and registrations all line up), but you may want to double check CI results directly rather than relying solely on this review for build/test correctness. If you'd like me to run these, go build/go test need to be added to allowed tools.

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