Skip to content

feat: add securitySchemes and outputSchema to the tools - #4

Merged
rbatista191 merged 1 commit into
mainfrom
feat/security-schemes-output-schema
Oct 1, 2026
Merged

rbatista191 merged 1 commit into
mainfrom
feat/security-schemes-output-schema

Conversation

@rbatista191

Copy link
Copy Markdown
Contributor

Linear: ENG-1014

This syncs cloro-dev/backend#392 to the public source. The hosted server at mcp.cloro.dev already runs it.

What changed

  • Every tool declares _meta.securitySchemes (oauth2, with the scopes of the 401 challenge). ChatGPT reads it to show its account-linking UI.
  • list_countries and list_states declare an outputSchema and return structuredContent as { countries } and { states }. The text block holds the same JSON.
  • The scrape tools have no outputSchema: nothing validates the scraper output before the server gets it, and a schema mismatch fails the call.
  • The tests are the same as in the backend, except the metrics test: this repo has no Prometheus registry.

The domain verification route from cloro-dev/backend#395 is not in this PR. It holds the token for the hosted server only.

Test

npx tsc --noEmit
npx vitest run

This syncs cloro-dev/backend#392 to the public source.

Every tool now declares _meta.securitySchemes with type oauth2 and the
scopes of the 401 challenge. ChatGPT reads this value to show its
account-linking UI.

list_countries and list_states now declare an outputSchema and return
structuredContent as { countries } and { states }. The scrape tools do
not declare an outputSchema, because nothing validates the scraper
output before the server gets it.

The domain verification route from cloro-dev/backend#395 is not in this
change. It holds the token of the hosted server only.
@rbatista191
rbatista191 merged commit 537175d into main Oct 1, 2026
2 checks passed
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