{"openapi":"3.1.0","info":{"title":"Flat (BYOK) API","version":"0.1.0","description":"Flat (BYOK) lets an AI assistant read your own Flat data through the Flat API with a key you supply (Flat personal access token). Read-only: 11 tools (get_me, get_user, list_user_scores, list_liked_scores, get_score, list_collections, get_collection, list_collection_scores, list_score_revisions, list_score_comments, list_score_tracks). The BYOK key travels with each request, is used for that one...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-flat.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-flat/docs"},"termsOfService":"https://connectorbay.com/byok-flat/terms"},"servers":[{"url":"https://byok-flat.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-flat/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_me":{"post":{"operationId":"get_me","summary":"Show the Flat account the token belongs to: username, display name, profile link, join date and public counters (scores,","description":"Show the Flat account the token belongs to: username, display name, profile link, join date and public counters (scores, followers, likes, plays). Needs the account.public_profile scope. Use for \"Which Flat account is my token connected to and how many followers do I have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_meArguments","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_user":{"post":{"operationId":"get_user","summary":"Get the public profile of a Flat user: name, bio, join date and counters for scores, followers, likes and plays. Use for","description":"Get the public profile of a Flat user: name, bio, join date and counters for scores, followers, likes and plays. Use for \"How many public scores and followers does the Flat user 'me' have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"user":{"description":"Flat user id, or 'me' for the account that owns the token.","maxLength":200,"title":"User","type":"string"}},"required":["user"],"title":"get_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_user_scores":{"post":{"operationId":"list_user_scores","summary":"List the public scores owned by a Flat user with title, composer, instruments, dates and like, view, play and comment to","description":"List the public scores owned by a Flat user with title, composer, instruments, dates and like, view, play and comment totals. Use for \"What public scores has this Flat user published\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"user":{"description":"Flat user id, or 'me' for the account that owns the token.","maxLength":200,"title":"User","type":"string"},"sort":{"anyOf":[{"enum":["creationDate","modificationDate","title"],"type":"string"},{"type":"null"}],"default":null,"description":"Order by creationDate, modificationDate or title.","title":"Sort"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction: asc or desc.","title":"Direction"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many items to return (1 to 100).","title":"Limit"}},"required":["user"],"title":"list_user_scoresArguments","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_liked_scores":{"post":{"operationId":"list_liked_scores","summary":"List the scores a Flat user has liked, with title, composer and popularity totals. Use for \"Which scores did I like on F","description":"List the scores a Flat user has liked, with title, composer and popularity totals. Use for \"Which scores did I like on Flat\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"user":{"description":"Flat user id, or 'me' for the account that owns the token.","maxLength":200,"title":"User","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many items to return (1 to 100).","title":"Limit"}},"required":["user"],"title":"list_liked_scoresArguments","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_score":{"post":{"operationId":"get_score","summary":"Get one score's metadata: title, composer, description, tags, license, tempo, key signature, length and popularity total","description":"Get one score's metadata: title, composer, description, tags, license, tempo, key signature, length and popularity totals. Use for \"What are the details of this Flat score\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"score":{"description":"Score id (a long hexadecimal identifier from a Flat score URL).","maxLength":200,"title":"Score","type":"string"}},"required":["score"],"title":"get_scoreArguments","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_collections":{"post":{"operationId":"list_collections","summary":"List the Flat collections (folders) of the token's account, including virtual ones such as allScores and likes, with pri","description":"List the Flat collections (folders) of the token's account, including virtual ones such as allScores and likes, with privacy and score counts. Use for \"What collections do I have on Flat\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"parent":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":"user","description":"Only list collections inside this parent collection id; 'user' (default) lists the account's top level.","title":"Parent"},"sort":{"anyOf":[{"enum":["creationDate","modificationDate","title"],"type":"string"},{"type":"null"}],"default":null,"description":"Order by creationDate, modificationDate or title.","title":"Sort"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction: asc or desc.","title":"Direction"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many items to return (1 to 100).","title":"Limit"}},"title":"list_collectionsArguments","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_collection":{"post":{"operationId":"get_collection","summary":"Get one collection's title, type, privacy, dates and number of scores. Use for \"How many scores are in my Flat allScores","description":"Get one collection's title, type, privacy, dates and number of scores. Use for \"How many scores are in my Flat allScores collection\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"collection":{"description":"Collection id, or an alias: 'app' (the token's app collection), 'trash', or a virtual collection 'allScores', 'collaborations' or 'likes'.","maxLength":200,"title":"Collection","type":"string"}},"required":["collection"],"title":"get_collectionArguments","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_collection_scores":{"post":{"operationId":"list_collection_scores","summary":"List the scores inside a collection with title, composer, dates and popularity totals. Use for \"Which scores are in my F","description":"List the scores inside a collection with title, composer, dates and popularity totals. Use for \"Which scores are in my Flat allScores collection\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"collection":{"description":"Collection id, or an alias: 'app' (the token's app collection), 'trash', or a virtual collection 'allScores', 'collaborations' or 'likes'.","maxLength":200,"title":"Collection","type":"string"},"sort":{"anyOf":[{"enum":["creationDate","modificationDate","title"],"type":"string"},{"type":"null"}],"default":null,"description":"Order by creationDate, modificationDate or title.","title":"Sort"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction: asc or desc.","title":"Direction"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many items to return (1 to 100).","title":"Limit"}},"required":["collection"],"title":"list_collection_scoresArguments","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_score_revisions":{"post":{"operationId":"list_score_revisions","summary":"List the saved revisions of a score, newest first, with author id, date, event and whether the revision was an autosave.","description":"List the saved revisions of a score, newest first, with author id, date, event and whether the revision was an autosave. Use for \"How often was this Flat score edited recently\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"score":{"description":"Score id (a long hexadecimal identifier from a Flat score URL).","maxLength":200,"title":"Score","type":"string"}},"required":["score"],"title":"list_score_revisionsArguments","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_score_comments":{"post":{"operationId":"list_score_comments","summary":"List the comments on a score, optionally only document-level or inline ones, with author id, date, text and resolved fla","description":"List the comments on a score, optionally only document-level or inline ones, with author id, date, text and resolved flag. Use for \"What comments has this Flat score received\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"score":{"description":"Score id (a long hexadecimal identifier from a Flat score URL).","maxLength":200,"title":"Score","type":"string"},"type":{"anyOf":[{"enum":["document","inline"],"type":"string"},{"type":"null"}],"default":null,"description":"Only comments of this type: document or inline.","title":"Type"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction: asc or desc.","title":"Direction"}},"required":["score"],"title":"list_score_commentsArguments","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_score_tracks":{"post":{"operationId":"list_score_tracks","summary":"List the audio or video tracks linked to a score (recordings on SoundCloud, YouTube, Vimeo or uploaded audio) with title","description":"List the audio or video tracks linked to a score (recordings on SoundCloud, YouTube, Vimeo or uploaded audio) with title, type and state. Use for \"Does this Flat score have linked recordings\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"score":{"description":"Score id (a long hexadecimal identifier from a Flat score URL).","maxLength":200,"title":"Score","type":"string"}},"required":["score"],"title":"list_score_tracksArguments","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}}}}