{"openapi":"3.1.0","info":{"title":"Treasure Data (BYOK) API","version":"0.1.0","description":"Treasure Data (BYOK) lets an AI assistant read your own Treasure Data data through the Treasure Data API with a key you supply (Treasure Data API key (TD1 key, read from your user profile)). Read-only: 9 tools (get_server_status, list_databases, list_tables, list_jobs, get_job, get_job_status, list_scheduled_queries, get_current_user, list_users). The BYOK key travels with each request, is used...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-treasuredata.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-treasuredata/docs"},"termsOfService":"https://connectorbay.com/byok-treasuredata/terms"},"servers":[{"url":"https://byok-treasuredata.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-treasuredata/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_server_status":{"post":{"operationId":"get_server_status","summary":"Check that the Treasure Data API on the US site is up and that the key is accepted. Use for \"Is the Treasure Data API up","description":"Check that the Treasure Data API on the US site is up and that the key is accepted. Use for \"Is the Treasure Data API up\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_server_statusArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_databases":{"post":{"operationId":"list_databases","summary":"List the databases of the account with record count and creation and update times. Use for \"Which databases do I have in","description":"List the databases of the account with record count and creation and update times. Use for \"Which databases do I have in Treasure Data and how many records are in each\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_databasesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_tables":{"post":{"operationId":"list_tables","summary":"List the tables of one database with type, record count, estimated storage size and last import time. The schema is left","description":"List the tables of one database with type, record count, estimated storage size and last import time. The schema is left out. Use for \"Which tables are in the sample_datasets database and when were they last loaded\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"database":{"description":"Name of the database, for example 'sample_datasets' (from list_databases).","maxLength":200,"title":"Database","type":"string"}},"required":["database"],"title":"list_tablesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_jobs":{"post":{"operationId":"list_jobs","summary":"List recent query jobs, newest first, with engine type, status, database, SQL text, times and record counts. Result data","description":"List recent query jobs, newest first, with engine type, status, database, SQL text, times and record counts. Result data and result URLs are left out. Use for \"Which Treasure Data queries failed recently\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"from_index":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Index of the first job to return, starting at 0.","title":"From Index"},"to_index":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Index of the last job to return; the service returns 20 jobs when omitted.","title":"To Index"},"status":{"anyOf":[{"enum":["queued","running","success","error"],"type":"string"},{"type":"null"}],"default":null,"description":"Only jobs with this status.","title":"Status"}},"title":"list_jobsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_job":{"post":{"operationId":"get_job","summary":"Get one query job: engine type, status, database, SQL text, start and end times, CPU time and record count. The result d","description":"Get one query job: engine type, status, database, SQL text, start and end times, CPU time and record count. The result data is not returned. Use for \"How long did Treasure Data job 1120145314 run and did it succeed\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"job_id":{"description":"Numeric job id as text, for example '1120145314' (from list_jobs).","maxLength":200,"title":"Job Id","type":"string"}},"required":["job_id"],"title":"get_jobArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_job_status":{"post":{"operationId":"get_job_status","summary":"Get only the current status (queued, running, success, error or killed) of one query job. Use for \"Is Treasure Data job ","description":"Get only the current status (queued, running, success, error or killed) of one query job. Use for \"Is Treasure Data job 1120145314 finished\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"job_id":{"description":"Numeric job id as text, for example '1120145314' (from list_jobs).","maxLength":200,"title":"Job Id","type":"string"}},"required":["job_id"],"title":"get_job_statusArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_scheduled_queries":{"post":{"operationId":"list_scheduled_queries","summary":"List scheduled queries with name, cron expression, time zone, engine, database, SQL text and next run time. Result desti","description":"List scheduled queries with name, cron expression, time zone, engine, database, SQL text and next run time. Result destinations are left out. Use for \"Which scheduled queries run in Treasure Data and when is the next run\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_scheduled_queriesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_current_user":{"post":{"operationId":"get_current_user","summary":"Show the Treasure Data user the key belongs to: name, roles and administrator flags. Email and phone are left out. Use f","description":"Show the Treasure Data user the key belongs to: name, roles and administrator flags. Email and phone are left out. Use for \"Which Treasure Data user does my key belong to\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_current_userArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_users":{"post":{"operationId":"list_users","summary":"List the users of the account with name, roles and administrator flags. Emails and phone numbers are left out. Use for \"","description":"List the users of the account with name, roles and administrator flags. Emails and phone numbers are left out. Use for \"Who are the administrators of my Treasure Data account\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_usersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}