Skip to content

Add Xquik OpenAPI UTCP example#14

Open
kriptoburak wants to merge 2 commits into
universal-tool-calling-protocol:mainfrom
kriptoburak:codex/add-xquik-openapi-example
Open

Add Xquik OpenAPI UTCP example#14
kriptoburak wants to merge 2 commits into
universal-tool-calling-protocol:mainfrom
kriptoburak:codex/add-xquik-openapi-example

Conversation

@kriptoburak

@kriptoburak kriptoburak commented Jul 3, 2026

Copy link
Copy Markdown

Summary

  • Add a Python UTCP example that registers Xquik from its public OpenAPI document.
  • Include a placeholder environment file and local setup notes.
  • Keep the script discovery-only by default so it does not call Xquik endpoints without a real key.

Validation

  • python3 -m json.tool python/xquik_openapi_example/providers.json
  • python3 -m py_compile python/xquik_openapi_example/xquik_openapi_example.py
  • git diff --check
  • Verified Xquik OpenAPI and MCP documentation links with curl.

Summary by cubic

Adds a Python UTCP example that registers Xquik tools from its public OpenAPI and prints matching tools. It runs in discovery-only mode by default; real calls require XQUIK_API_KEY.

  • New Features

    • New python/xquik_openapi_example with xquik_openapi_example.py that loads providers.json, fetches https://xquik.com/openapi.json, registers tools, and prints matches.
    • Uses a dotenv loader; XQUIK_API_KEY is applied to generated Xquik tools via the x-api-key header. example.env and README included for quick setup.
  • Dependencies

    • Adds python-dotenv, utcp, and utcp-http in requirements.txt.

Written for commit d5d18a0. Summary will update on new commits.

Review in cubic

@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.

1 issue found across 5 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="python/xquik_openapi_example/providers.json">

<violation number="1" location="python/xquik_openapi_example/providers.json:23">
P2: The `xquik` manual call template sends an API key when fetching `https://xquik.com/openapi.json`, but the PR describes this as a public OpenAPI document and the comparable `openlibrary` example in the repo fetches its public spec with no auth at all. If `$XQUIK_API_KEY` is unset, discovery may fail entirely because of the unresolved variable; if it is set, credentials are unnecessarily exposed on a public request. Consider removing the `auth` block from this template and letting the actual tool calls (defined by the OpenAPI spec) carry any required authentication instead.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

"http_method": "GET",
"url": "https://xquik.com/openapi.json",
"content_type": "application/json",
"auth": {

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: The xquik manual call template sends an API key when fetching https://xquik.com/openapi.json, but the PR describes this as a public OpenAPI document and the comparable openlibrary example in the repo fetches its public spec with no auth at all. If $XQUIK_API_KEY is unset, discovery may fail entirely because of the unresolved variable; if it is set, credentials are unnecessarily exposed on a public request. Consider removing the auth block from this template and letting the actual tool calls (defined by the OpenAPI spec) carry any required authentication instead.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At python/xquik_openapi_example/providers.json, line 23:

<comment>The `xquik` manual call template sends an API key when fetching `https://xquik.com/openapi.json`, but the PR describes this as a public OpenAPI document and the comparable `openlibrary` example in the repo fetches its public spec with no auth at all. If `$XQUIK_API_KEY` is unset, discovery may fail entirely because of the unresolved variable; if it is set, credentials are unnecessarily exposed on a public request. Consider removing the `auth` block from this template and letting the actual tool calls (defined by the OpenAPI spec) carry any required authentication instead.</comment>

<file context>
@@ -0,0 +1,31 @@
+      "http_method": "GET",
+      "url": "https://xquik.com/openapi.json",
+      "content_type": "application/json",
+      "auth": {
+        "auth_type": "api_key",
+        "api_key": "$XQUIK_API_KEY",
</file context>

@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: ef0992f8e3

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

"http_method": "GET",
"url": "https://xquik.com/openapi.json",
"content_type": "application/json",
"auth": {

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 Move Xquik API key to auth_tools

For OpenAPI ingestion, UTCP uses auth only when fetching the OpenAPI document; generated operation call templates get their call authentication from auth_tools or placeholders derived from the spec. Since Xquik's spec marks its API with x-api-key, replacing example.env with a real XQUIK_API_KEY still leaves registered tools using generated placeholders/unauthenticated calls, so users who follow the README and call a discovered Xquik endpoint will hit authentication failures. Put this block under auth_tools and leave auth off unless the spec URL itself needs authentication.

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