diff --git a/docker/toolkits.txt b/docker/toolkits.txt index 4d840867..9ba61549 100644 --- a/docker/toolkits.txt +++ b/docker/toolkits.txt @@ -2,6 +2,7 @@ arcade-airtable-api arcade-box-api arcade-calendly-api arcade-cursor-agents-api +arcade-figma-api arcade-freshservice-api arcade-linkedin arcade-math diff --git a/toolkits/figma_api/.pre-commit-config.yaml b/toolkits/figma_api/.pre-commit-config.yaml new file mode 100644 index 00000000..bb18c5e3 --- /dev/null +++ b/toolkits/figma_api/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +files: ^.*/figma_api/.* +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: "v4.4.0" + hooks: + - id: check-case-conflict + - id: check-merge-conflict + - id: check-toml + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.6.7 + hooks: + - id: ruff + args: [--fix] + - id: ruff-format diff --git a/toolkits/figma_api/.ruff.toml b/toolkits/figma_api/.ruff.toml new file mode 100644 index 00000000..9519fe6c --- /dev/null +++ b/toolkits/figma_api/.ruff.toml @@ -0,0 +1,44 @@ +target-version = "py310" +line-length = 100 +fix = true + +[lint] +select = [ + # flake8-2020 + "YTT", + # flake8-bandit + "S", + # flake8-bugbear + "B", + # flake8-builtins + "A", + # flake8-comprehensions + "C4", + # flake8-debugger + "T10", + # flake8-simplify + "SIM", + # isort + "I", + # mccabe + "C90", + # pycodestyle + "E", "W", + # pyflakes + "F", + # pygrep-hooks + "PGH", + # pyupgrade + "UP", + # ruff + "RUF", + # tryceratops + "TRY", +] + +[lint.per-file-ignores] +"**/tests/*" = ["S101"] + +[format] +preview = true +skip-magic-trailing-comma = false diff --git a/toolkits/figma_api/LICENSE b/toolkits/figma_api/LICENSE new file mode 100644 index 00000000..dfbb8b76 --- /dev/null +++ b/toolkits/figma_api/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025, Arcade AI + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/toolkits/figma_api/Makefile b/toolkits/figma_api/Makefile new file mode 100644 index 00000000..86da492a --- /dev/null +++ b/toolkits/figma_api/Makefile @@ -0,0 +1,54 @@ +.PHONY: help + +help: + @echo "🛠️ github Commands:\n" + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + +.PHONY: install +install: ## Install the uv environment and install all packages with dependencies + @echo "🚀 Creating virtual environment and installing all packages using uv" + @uv sync --active --all-extras --no-sources + @if [ -f .pre-commit-config.yaml ]; then uv run --no-sources pre-commit install; fi + @echo "✅ All packages and dependencies installed via uv" + +.PHONY: install-local +install-local: ## Install the uv environment and install all packages with dependencies with local Arcade sources + @echo "🚀 Creating virtual environment and installing all packages using uv" + @uv sync --active --all-extras + @if [ -f .pre-commit-config.yaml ]; then uv run pre-commit install; fi + @echo "✅ All packages and dependencies installed via uv" +.PHONY: build +build: clean-build ## Build wheel file using poetry + @echo "🚀 Creating wheel file" + uv build + +.PHONY: clean-build +clean-build: ## clean build artifacts + @echo "🗑️ Cleaning dist directory" + rm -rf dist + +.PHONY: test +test: ## Test the code with pytest + @echo "🚀 Testing code: Running pytest" + @uv run --no-sources pytest -W ignore -v --cov --cov-config=pyproject.toml --cov-report=xml + +.PHONY: coverage +coverage: ## Generate coverage report + @echo "coverage report" + @uv run --no-sources coverage report + @echo "Generating coverage report" + @uv run --no-sources coverage html + +.PHONY: bump-version +bump-version: ## Bump the version in the pyproject.toml file by a patch version + @echo "🚀 Bumping version in pyproject.toml" + uv version --no-sources --bump patch + +.PHONY: check +check: ## Run code quality tools. + @if [ -f .pre-commit-config.yaml ]; then\ + echo "🚀 Linting code: Running pre-commit";\ + uv run --no-sources pre-commit run -a;\ + fi + @echo "🚀 Static type checking: Running mypy" + @uv run --no-sources mypy --config-file=pyproject.toml diff --git a/toolkits/figma_api/arcade_figma_api/__init__.py b/toolkits/figma_api/arcade_figma_api/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/toolkits/figma_api/arcade_figma_api/tools/__init__.py b/toolkits/figma_api/arcade_figma_api/tools/__init__.py new file mode 100644 index 00000000..c1de04b5 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/tools/__init__.py @@ -0,0 +1,2444 @@ +"""Arcade Starter Tools for Figma + +DO NOT EDIT THIS MODULE DIRECTLY. + +THIS MODULE WAS AUTO-GENERATED BY TRANSPILING THE API STARTER TOOL JSON DEFINITIONS +IN THE ../wrapper_tools DIRECTORY INTO PYTHON CODE. ANY CHANGES TO THIS MODULE WILL +BE OVERWRITTEN BY THE TRANSPILER. +""" + +import asyncio +import json +from enum import Enum +from typing import Annotated, Any + +import httpx +import jsonschema +from arcade_tdk import ToolContext, tool +from arcade_tdk.auth import OAuth2 +from arcade_tdk.errors import RetryableToolError + +from .request_body_schemas import REQUEST_BODY_SCHEMAS + +# Retry configuration +INITIAL_RETRY_DELAY = 0.5 # seconds + +HTTP_CLIENT = httpx.AsyncClient( + timeout=httpx.Timeout(60.0, connect=10.0), + limits=httpx.Limits(max_keepalive_connections=20, max_connections=100), + transport=httpx.AsyncHTTPTransport(retries=3), + http2=True, + follow_redirects=True, +) + + +class ToolMode(str, Enum): + """Mode for tools with complex request bodies.""" + + GET_REQUEST_SCHEMA = "get_request_schema" + EXECUTE = "execute" + + +def remove_none_values(data: dict[str, Any]) -> dict[str, Any]: + return {k: v for k, v in data.items() if v is not None} + + +async def make_request( + url: str, + method: str, + params: dict[str, Any] | None = None, + headers: dict[str, Any] | None = None, + data: str | None = None, + max_retries: int = 3, +) -> httpx.Response: + """Make an HTTP request with retry logic for 5xx server errors.""" + for attempt in range(max_retries): + try: + response = await HTTP_CLIENT.request( + url=url, + method=method, + params=params, + headers=headers, + data=data, # type: ignore[arg-type] + ) + response.raise_for_status() + except httpx.HTTPStatusError as e: + # Only retry on 5xx server errors + if e.response.status_code >= 500 and attempt < max_retries - 1: + # Exponential backoff: 0.5s, 1s, 2s + await asyncio.sleep(INITIAL_RETRY_DELAY * (2**attempt)) + continue + # Re-raise for 4xx errors or if max retries reached + raise + except httpx.RequestError: + # Don't retry request errors (network issues are handled by transport) + raise + else: + return response + + # This should never be reached, but satisfies type checker + raise httpx.RequestError("Max retries exceeded") # noqa: TRY003 + + +def validate_json_against_schema( + json_data: dict[str, Any], schema: dict[str, Any] +) -> tuple[bool, str | None]: + """Validate JSON data against an OpenAPI/JSON Schema. + + This provides full JSON Schema Draft 7 validation including: + - Required fields, types, enums + - Pattern validation (regex) + - Format validation (email, uuid, date-time, etc.) + - Min/max length and values + - oneOf, anyOf, allOf + - And all other JSON Schema features + + Args: + json_data: The JSON data to validate + schema: The JSON Schema to validate against + + Returns: + Tuple of (is_valid, error_messages). If valid, error_messages is None. + If invalid, error_messages contains all validation errors. + """ + try: + validator = jsonschema.Draft7Validator( + schema, format_checker=jsonschema.Draft7Validator.FORMAT_CHECKER + ) + # Collect ALL validation errors + errors = list(validator.iter_errors(json_data)) + if errors: + # Format all errors with their paths + error_messages = [] + for error in errors: + error_path = ".".join(str(p) for p in error.path) if error.path else "root" + error_messages.append(f"{error.message} at {error_path}") + # Join all errors with newlines + return False, "\n".join(error_messages) + else: + return True, None + except jsonschema.SchemaError as e: + return False, f"Invalid schema: {e.message}" + except Exception as e: + return False, f"Validation error: {e!s}" + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_content:read"])) +async def fetch_figma_file( + context: ToolContext, + file_key: Annotated[str, "The unique key of the Figma file or branch to retrieve as JSON."], + version_id: Annotated[ + str | None, + "Specify the version ID to retrieve a specific version of the file. Default is the current version.", # noqa: E501 + ] = None, + node_ids_of_interest: Annotated[ + str | None, + "Comma-separated list of node IDs to retrieve specific parts of the Figma document.", + ] = None, + traversal_depth: Annotated[ + float | None, + "Positive integer indicating the depth in the document tree to retrieve. For example, 1 returns only Pages; 2 returns Pages and top-level objects.", # noqa: E501 + ] = None, + export_vector_data: Annotated[ + str | None, 'Set to "paths" to include vector data in the response.' + ] = None, + include_plugin_data: Annotated[ + str | None, + "Comma separated list of plugin IDs and/or 'shared'. Includes plugin data in the result.", + ] = None, + include_branch_metadata: Annotated[ + bool | None, + "Set to true to include metadata about branches related to the file. If false, branch information will not be returned.", # noqa: E501 + ] = False, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getFile'."]: + """Retrieve a Figma file as a JSON object using its file key. + + Use this tool to fetch a Figma document as JSON, identified by a file key. The returned data includes the document structure and metadata about components.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}".format(file_key=file_key), # noqa: UP032 + method="GET", + params=remove_none_values({ + "version": version_id, + "ids": node_ids_of_interest, + "depth": traversal_depth, + "geometry": export_vector_data, + "plugin_data": include_plugin_data, + "branch_data": include_branch_metadata, + }), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_content:read"])) +async def get_figma_file_nodes( + context: ToolContext, + node_ids_to_retrieve: Annotated[ + str, "A comma-separated list of Figma node IDs to retrieve as JSON." + ], + figma_file_key: Annotated[ + str, "The file or branch key from which to export JSON data in Figma." + ], + specific_version_id: Annotated[ + str | None, + "Specify a version ID to retrieve a particular version of the Figma file. If omitted, the current version is retrieved.", # noqa: E501 + ] = None, + node_tree_depth: Annotated[ + float | None, + "Positive integer indicating how deep into the node tree to traverse from the starting node. A value of 1 returns only immediate children. Leaving it unset returns all nodes.", # noqa: E501 + ] = None, + export_vector_data: Annotated[ + str | None, 'Set to "paths" to include vector data in the response.' + ] = None, + include_plugin_data: Annotated[ + str | None, + "Comma-separated plugin IDs and/or 'shared' to include plugin-related data in results.", + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getFileNodes'."]: + """Retrieve nodes and metadata from a Figma file. + + Use this tool to get detailed information about specific nodes in a Figma file, including metadata like name, last modified date, thumbnail URL, editor type, version, and link access permissions. Also retrieves document structure, component mappings, and styles. Useful for accessing and analyzing Figma design elements.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/nodes".format(file_key=figma_file_key), # noqa: UP032 + method="GET", + params=remove_none_values({ + "ids": node_ids_to_retrieve, + "version": specific_version_id, + "depth": node_tree_depth, + "geometry": export_vector_data, + "plugin_data": include_plugin_data, + }), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_content:read"])) +async def render_figma_images( + context: ToolContext, + node_ids_to_render: Annotated[ + str, "A comma-separated list of node IDs for images to be rendered." + ], + figma_file_key: Annotated[ + str, + "The key for the Figma file or branch to export images from. Use with the `branch_data` query parameter to obtain branch key if needed.", # noqa: E501 + ], + version_id: Annotated[ + str | None, + "Specify a version ID to retrieve a particular version of a Figma file. If omitted, will use the current version.", # noqa: E501 + ] = None, + image_scale_factor: Annotated[ + float | None, + "A number between 0.01 and 4, representing the image scaling factor for rendering.", + ] = None, + image_output_format: Annotated[ + str | None, + "Specify the image format for the output. Options are 'jpg', 'png', 'svg', or 'pdf'.", + ] = "png", + render_text_as_outlines: Annotated[ + bool | None, + "Determines if text elements are rendered as outlines in SVGs. Set `true` for visual consistency; `false` for selectable text.", # noqa: E501 + ] = True, + include_svg_id_attributes: Annotated[ + bool | None, + "Include id attributes for all SVG elements. Adds the layer name to the 'id' attribute.", + ] = False, + include_node_id_in_svg_elements: Annotated[ + bool | None, + "Set to true to include node ID attributes for all SVG elements, adding the node ID to a `data-node-id` attribute.", # noqa: E501 + ] = False, + svg_stroke_simplification_enabled: Annotated[ + bool | None, + "Set to true to simplify inside/outside strokes in SVG using stroke attributes instead of ``.", # noqa: E501 + ] = True, + exclude_overlapping_content: Annotated[ + bool | None, + "Set to true to exclude overlapping content from rendering. Set to false to include overlaps, which may increase processing time.", # noqa: E501 + ] = True, + use_full_dimensions_without_cropping: Annotated[ + bool | None, + "Export using full node dimensions, ignoring cropping and empty space. Ensures text nodes are fully visible.", # noqa: E501 + ] = False, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getImages'."]: + """Fetch rendered images from Figma files by node IDs. + + Use this tool to render and retrieve images from a Figma file by specifying node IDs. The tool returns a mapping of node IDs to URLs of the rendered images. Note: Some entries may be null if rendering fails for certain nodes. Images expire after 30 days.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/images/{file_key}".format(file_key=figma_file_key), # noqa: UP032 + method="GET", + params=remove_none_values({ + "ids": node_ids_to_render, + "version": version_id, + "scale": image_scale_factor, + "format": image_output_format, + "svg_outline_text": render_text_as_outlines, + "svg_include_id": include_svg_id_attributes, + "svg_include_node_id": include_node_id_in_svg_elements, + "svg_simplify_stroke": svg_stroke_simplification_enabled, + "contents_only": exclude_overlapping_content, + "use_absolute_bounds": use_full_dimensions_without_cropping, + }), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_content:read"])) +async def fetch_image_fill_links( + context: ToolContext, + file_or_branch_key: Annotated[ + str, + "The file or branch key from which to retrieve image URLs. Use `GET /v1/files/:key` to get the branch key if needed.", # noqa: E501 + ], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getImageFills'."]: + """Retrieve download links for images in a Figma document. + + Use this tool to get download links for all images present in the image fills of a Figma document. These links allow access to images users have added to their design files. The URLs will expire after about 14 days and can be found using image references.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/images".format(file_key=file_or_branch_key), # noqa: UP032 + method="GET", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_metadata:read"])) +async def get_file_metadata( + context: ToolContext, + file_identifier: Annotated[ + str, + "File or branch key to get metadata for. Use the `branch_data` query param to get the branch key.", # noqa: E501 + ], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getFileMeta'."]: + """Retrieve metadata for a specified Figma file. + + This tool is used to obtain metadata information from a specific Figma file by providing the file key. It can be called when users need to access details about a Figma file, such as its name, creator, and other properties.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/meta".format(file_key=file_identifier), # noqa: UP032 + method="GET", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["projects:read"])) +async def figma_get_team_projects( + context: ToolContext, + team_id: Annotated[ + str, + "The unique ID of the Figma team to list projects from. This is required to specify which team's projects to retrieve.", # noqa: E501 + ], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getTeamProjects'."]: + """Fetch all projects within a specified Figma team. + + This tool retrieves a list of projects for a specified team in Figma, visible to the authenticated user.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/teams/{team_id}/projects".format(team_id=team_id), # noqa: UP032 + method="GET", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["projects:read"])) +async def get_figma_project_files( + context: ToolContext, + project_identifier: Annotated[ + str, "The unique string ID of the Figma project from which to list files." + ], + include_branch_metadata: Annotated[ + bool | None, + "Include branch metadata for each main file with a branch in the project. Set to true to receive this data, otherwise false.", # noqa: E501 + ] = False, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getProjectFiles'."]: + """Retrieve all files from a specific Figma project. + + This tool fetches a list of all files within the specified Figma project. Use it when you need to access or manage project files stored in Figma.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/projects/{project_id}/files".format( # noqa: UP032 + project_id=project_identifier + ), + method="GET", + params=remove_none_values({"branch_data": include_branch_metadata}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_versions:read"])) +async def fetch_file_version_history( + context: ToolContext, + target_file_key: Annotated[ + str, + "The key of the file or branch to fetch version history for. Use this to specify the Figma file whose version history you need.", # noqa: E501 + ], + number_of_items_per_page: Annotated[ + float | None, + "Specify the number of items to return per page. Defaults to 30 if not provided.", + ] = None, + get_versions_before_id: Annotated[ + float | None, "A version ID to get versions before it in the history. Used for pagination." + ] = None, + after_version_id: Annotated[ + float | None, + "Version ID to fetch subsequent versions. Used for pagination. Omit if not paginating.", + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getFileVersions'."]: + """Fetch the version history of a Figma file. + + Use this tool to obtain the version history of a specific Figma file, enabling the analysis of its changes over time. This can be useful for reviewing past edits or rendering specific versions.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/versions".format(file_key=target_file_key), # noqa: UP032 + method="GET", + params=remove_none_values({ + "page_size": number_of_items_per_page, + "before": get_versions_before_id, + "after": after_version_id, + }), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_comments:read"])) +async def get_figma_file_comments( + context: ToolContext, + figma_file_or_branch_key: Annotated[ + str, + "Specify the file or branch key to retrieve comments from. Use the `GET /v1/files/:key` endpoint with `branch_data` query param for branch keys.", # noqa: E501 + ], + return_comments_as_markdown: Annotated[ + bool | None, "Set to true to return comments as markdown equivalents when applicable." + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getComments'."]: + """Retrieve comments from a Figma file. + + Use this tool to get a list of comments left on a specific Figma file. It is useful for accessing feedback or discussions related to file elements.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/comments".format( # noqa: UP032 + file_key=figma_file_or_branch_key + ), + method="GET", + params=remove_none_values({"as_md": return_comments_as_markdown}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_comments:write"])) +async def add_comment_to_figma_file( + context: ToolContext, + mode: Annotated[ + ToolMode, + "Operation mode: 'get_request_schema' returns the OpenAPI spec " + "for the request body, 'execute' performs the actual operation", + ], + figma_file_key: Annotated[ + str | None, + "File or branch key for the Figma file where the comment will be added. Retrieve this using `GET /v1/files/:key` with the `branch_data` query param for branch keys. Required when mode is 'execute', ignored when mode is 'get_request_schema'.", # noqa: E501 + ] = None, + request_body: Annotated[ + str | None, + "Stringified JSON representing the request body. Required when " + "mode is 'execute', ignored when mode is 'get_request_schema'", + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'postComment'."]: + """Posts a new comment on a Figma file. + + Use this tool to post a new comment on a specified file in Figma, identified by file_key. + + Note: Understanding the request schema is necessary to properly create + the stringified JSON input object for execution.\n\nThis operation also requires path parameters. + + Modes: + - GET_REQUEST_SCHEMA: Returns the schema. Only call if you don't + already have it. Do NOT call repeatedly if you already received + the schema. + - EXECUTE: Performs the operation with the provided request body + JSON.\n Note: You must also provide the required path parameters when executing. + + If you need the schema, call with mode='get_request_schema' ONCE, then execute. + """ # noqa: E501 + if mode == ToolMode.GET_REQUEST_SCHEMA: + return { + "request_body_schema": REQUEST_BODY_SCHEMAS[ + "ADDCOMMENTTOFIGMAFILE_REQUEST_BODY_SCHEMA" + ], + "instructions": ( + "Use the request_body_schema to construct a valid JSON object. " + "Once you have populated the object following the schema " + "structure and requirements, call this tool again with " + "mode='execute' and the stringified JSON as the " + "request_body parameter along with the required path parameters. " + "Do NOT call the schema mode again - you already have " + "the schema now." + ), + } + + # Mode is EXECUTE - validate parameters + # Validate required path parameter: figma_file_key + if not figma_file_key: + raise RetryableToolError( + message="Invalid or missing figma_file_key parameter", + developer_message=f"Path parameter " + f"'figma_file_key' validation failed. " + f"Received: {figma_file_key}", + additional_prompt_content=( + "The 'figma_file_key' parameter is required when " + "executing this operation. " + "Please call this tool again with a valid " + "figma_file_key value." + ), + ) + + # Validate request body is provided (not None or empty string) + # Note: Empty objects like {} are allowed - schema validation will check if valid + if request_body is None or request_body.strip() == "": + raise RetryableToolError( + message="Request body is required when mode is 'execute'", + developer_message="The request_body parameter was null or empty string", + additional_prompt_content=( + "The request body is required to perform this operation. " + "Use the schema below to construct a valid JSON object, " + "then call this tool again in execute mode with the " + "stringified JSON as the request_body parameter.\n\n" + "Schema:\n\n" + + json.dumps( + REQUEST_BODY_SCHEMAS["ADDCOMMENTTOFIGMAFILE_REQUEST_BODY_SCHEMA"], indent=2 + ) + ), + ) + + # Parse JSON + try: + request_data = json.loads(request_body) + except json.JSONDecodeError as e: + raise RetryableToolError( + message=f"Invalid JSON in request body: {e!s}", + developer_message=f"JSON parsing failed: {e!s}", + additional_prompt_content=( + f"The request body contains invalid JSON. Error: {e!s}\n\n" + "Please provide a valid JSON string that matches the schema " + "below, then call this tool again in execute mode.\n\n" + "Schema:\n\n" + + json.dumps( + REQUEST_BODY_SCHEMAS["ADDCOMMENTTOFIGMAFILE_REQUEST_BODY_SCHEMA"], indent=2 + ) + ), + ) from e + + # Validate against schema + is_valid, validation_error = validate_json_against_schema( + request_data, REQUEST_BODY_SCHEMAS["ADDCOMMENTTOFIGMAFILE_REQUEST_BODY_SCHEMA"] + ) + if not is_valid: + raise RetryableToolError( + message=f"Request body validation failed: {validation_error}", + developer_message=f"Schema validation error: {validation_error}", + additional_prompt_content=( + f"The request body does not match the required schema. " + f"Errors:\n{validation_error}\n\n" + "Please fix the validation errors above and call this tool " + "again in execute mode with the corrected JSON.\n\n" + "Required schema:\n\n" + f"{json.dumps(REQUEST_BODY_SCHEMAS['ADDCOMMENTTOFIGMAFILE_REQUEST_BODY_SCHEMA'], indent=2)}" # noqa: E501 + ), + ) + + # Make the actual API request + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/comments".format(file_key=figma_file_key), # noqa: UP032 + method="POST", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_comments:write"])) +async def delete_figma_comment( + context: ToolContext, + figma_file_key: Annotated[ + str, + "The file or branch key from which to delete the comment. Use `GET /v1/files/:key` with `branch_data` to obtain the branch key.", # noqa: E501 + ], + comment_identifier: Annotated[ + str, + "The ID of the comment you wish to delete from the Figma file. Only the original commenter can perform this action.", # noqa: E501 + ], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'deleteComment'."]: + """Delete your comment from a Figma file. + + Use this tool to delete a specific comment you made on a Figma file. Only the original commenter can delete their comments.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/comments/{comment_id}".format( # noqa: UP032 + file_key=figma_file_key, comment_id=comment_identifier + ), + method="DELETE", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_comments:read"])) +async def fetch_comment_reactions( + context: ToolContext, + file_or_branch_key: Annotated[ + str, "The key for the file or branch to retrieve the comment reactions from in Figma." + ], + comment_id: Annotated[str, "ID of the comment from which to retrieve reactions."], + pagination_cursor: Annotated[ + str | None, + "Cursor for pagination. Use the cursor from the previous call's response to retrieve the next set of reactions.", # noqa: E501 + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getCommentReactions'."]: + """Retrieve reactions from a specific comment in Figma. + + Use this tool to obtain a list of reactions left on a specific comment in a Figma file. This can help track engagement or feedback on comments.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/comments/{comment_id}/reactions".format( # noqa: UP032 + file_key=file_or_branch_key, comment_id=comment_id + ), + method="GET", + params=remove_none_values({"cursor": pagination_cursor}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_comments:write"])) +async def add_figma_comment_reaction( + context: ToolContext, + mode: Annotated[ + ToolMode, + "Operation mode: 'get_request_schema' returns the OpenAPI spec " + "for the request body, 'execute' performs the actual operation", + ], + file_or_branch_key: Annotated[ + str | None, + "Key of the file or branch where the comment reaction should be posted. Can be obtained via the Figma API. Required when mode is 'execute', ignored when mode is 'get_request_schema'.", # noqa: E501 + ] = None, + comment_id: Annotated[ + str | None, + "The unique identifier of the comment you want to react to in a Figma file. Required when mode is 'execute', ignored when mode is 'get_request_schema'.", # noqa: E501 + ] = None, + request_body: Annotated[ + str | None, + "Stringified JSON representing the request body. Required when " + "mode is 'execute', ignored when mode is 'get_request_schema'", + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'postCommentReaction'."]: + """Add a reaction to a comment on a Figma file. + + Use this tool to post a new reaction to an existing comment on a Figma file. It should be called when you want to react to a specific comment in a Figma project. + + Note: Understanding the request schema is necessary to properly create + the stringified JSON input object for execution.\n\nThis operation also requires path parameters. + + Modes: + - GET_REQUEST_SCHEMA: Returns the schema. Only call if you don't + already have it. Do NOT call repeatedly if you already received + the schema. + - EXECUTE: Performs the operation with the provided request body + JSON.\n Note: You must also provide the required path parameters when executing. + + If you need the schema, call with mode='get_request_schema' ONCE, then execute. + """ # noqa: E501 + if mode == ToolMode.GET_REQUEST_SCHEMA: + return { + "request_body_schema": REQUEST_BODY_SCHEMAS[ + "ADDFIGMACOMMENTREACTION_REQUEST_BODY_SCHEMA" + ], + "instructions": ( + "Use the request_body_schema to construct a valid JSON object. " + "Once you have populated the object following the schema " + "structure and requirements, call this tool again with " + "mode='execute' and the stringified JSON as the " + "request_body parameter along with the required path parameters. " + "Do NOT call the schema mode again - you already have " + "the schema now." + ), + } + + # Mode is EXECUTE - validate parameters + # Validate required path parameter: file_or_branch_key + if not file_or_branch_key: + raise RetryableToolError( + message="Invalid or missing file_or_branch_key parameter", + developer_message=f"Path parameter " + f"'file_or_branch_key' validation failed. " + f"Received: {file_or_branch_key}", + additional_prompt_content=( + "The 'file_or_branch_key' parameter is required when " + "executing this operation. " + "Please call this tool again with a valid " + "file_or_branch_key value." + ), + ) + + # Validate required path parameter: comment_id + if not comment_id: + raise RetryableToolError( + message="Invalid or missing comment_id parameter", + developer_message=f"Path parameter " + f"'comment_id' validation failed. " + f"Received: {comment_id}", + additional_prompt_content=( + "The 'comment_id' parameter is required when " + "executing this operation. " + "Please call this tool again with a valid " + "comment_id value." + ), + ) + + # Validate request body is provided (not None or empty string) + # Note: Empty objects like {} are allowed - schema validation will check if valid + if request_body is None or request_body.strip() == "": + raise RetryableToolError( + message="Request body is required when mode is 'execute'", + developer_message="The request_body parameter was null or empty string", + additional_prompt_content=( + "The request body is required to perform this operation. " + "Use the schema below to construct a valid JSON object, " + "then call this tool again in execute mode with the " + "stringified JSON as the request_body parameter.\n\n" + "Schema:\n\n" + + json.dumps( + REQUEST_BODY_SCHEMAS["ADDFIGMACOMMENTREACTION_REQUEST_BODY_SCHEMA"], indent=2 + ) + ), + ) + + # Parse JSON + try: + request_data = json.loads(request_body) + except json.JSONDecodeError as e: + raise RetryableToolError( + message=f"Invalid JSON in request body: {e!s}", + developer_message=f"JSON parsing failed: {e!s}", + additional_prompt_content=( + f"The request body contains invalid JSON. Error: {e!s}\n\n" + "Please provide a valid JSON string that matches the schema " + "below, then call this tool again in execute mode.\n\n" + "Schema:\n\n" + + json.dumps( + REQUEST_BODY_SCHEMAS["ADDFIGMACOMMENTREACTION_REQUEST_BODY_SCHEMA"], indent=2 + ) + ), + ) from e + + # Validate against schema + is_valid, validation_error = validate_json_against_schema( + request_data, REQUEST_BODY_SCHEMAS["ADDFIGMACOMMENTREACTION_REQUEST_BODY_SCHEMA"] + ) + if not is_valid: + raise RetryableToolError( + message=f"Request body validation failed: {validation_error}", + developer_message=f"Schema validation error: {validation_error}", + additional_prompt_content=( + f"The request body does not match the required schema. " + f"Errors:\n{validation_error}\n\n" + "Please fix the validation errors above and call this tool " + "again in execute mode with the corrected JSON.\n\n" + "Required schema:\n\n" + f"{json.dumps(REQUEST_BODY_SCHEMAS['ADDFIGMACOMMENTREACTION_REQUEST_BODY_SCHEMA'], indent=2)}" # noqa: E501 + ), + ) + + # Make the actual API request + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/comments/{comment_id}/reactions".format( # noqa: UP032 + file_key=file_or_branch_key, comment_id=comment_id + ), + method="POST", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_comments:write"])) +async def delete_my_comment_reaction( + context: ToolContext, + reaction_emoji: Annotated[ + str, + "The emoji associated with the reaction to be deleted. Only the emoji used for the reaction you added can be deleted.", # noqa: E501 + ], + file_or_branch_key: Annotated[ + str, + "Key of the Figma file or branch where the reaction should be deleted. Use `GET /v1/files/:key` with the `branch_data` query param to obtain the branch key if needed.", # noqa: E501 + ], + comment_id: Annotated[ + str, "The ID of the comment from which you want to delete your reaction." + ], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'deleteCommentReaction'."]: + """Deletes your specific comment reaction in Figma. + + This tool allows users to delete a reaction they added to a comment in a Figma file. It can only be used if the reaction was made by the person attempting to delete it.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/comments/{comment_id}/reactions".format( # noqa: UP032 + file_key=file_or_branch_key, comment_id=comment_id + ), + method="DELETE", + params=remove_none_values({"emoji": reaction_emoji}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["current_user:read"])) +async def get_user_information( + context: ToolContext, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getMe'."]: + """Retrieve information for the authenticated Figma user. + + Use this tool to obtain the profile information of the user currently authenticated in the Figma service.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/me", + method="GET", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["team_library_content:read"])) +async def get_team_components( + context: ToolContext, + team_id: Annotated[ + str, + "The unique identifier of the team whose components you want to retrieve. This ID is necessary to specify the source team library in Figma.", # noqa: E501 + ], + number_of_items_per_page: Annotated[ + float | None, + "Specify the number of components to return in one page. Defaults to 30, maximum is 1000.", + ] = 30, + cursor_after_id: Annotated[ + float | None, + "Cursor indicating which ID to start retrieving components after. Cannot be used with 'before'.", # noqa: E501 + ] = None, + cursor_before: Annotated[ + float | None, + "Cursor to retrieve components starting before a specific id. Exclusive with 'cursor_after'.", # noqa: E501 + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getTeamComponents'."]: + """Retrieve published components from a team's Figma library. + + Use this tool to get a list of components that have been published within a specified team's library in Figma.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/teams/{team_id}/components".format(team_id=team_id), # noqa: UP032 + method="GET", + params=remove_none_values({ + "page_size": number_of_items_per_page, + "after": cursor_after_id, + "before": cursor_before, + }), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["library_content:read"])) +async def get_figma_file_components( + context: ToolContext, + file_key: Annotated[str, "Main file key to list components from. Must not be a branch key."], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getFileComponents'."]: + """Retrieve published components from a Figma file library. + + Use this tool to obtain a list of all published components within a specific Figma file, allowing for design asset management or analysis.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/components".format(file_key=file_key), # noqa: UP032 + method="GET", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["library_assets:read"])) +async def get_figma_component_metadata( + context: ToolContext, + component_key: Annotated[ + str, "The unique identifier of the Figma component to retrieve metadata for." + ], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getComponent'."]: + """Retrieve metadata for a Figma component by key. + + Use this tool to obtain detailed metadata about a specific Figma component using its key.""" + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/components/{key}".format(key=component_key), # noqa: UP032 + method="GET", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["team_library_content:read"])) +async def get_team_component_sets( + context: ToolContext, + team_id: Annotated[ + str, "The unique identifier for the team from which to list component sets." + ], + number_of_items_per_page: Annotated[ + float | None, + "Specify the number of items to return per page in the results. Defaults to 30.", + ] = 30, + start_after_cursor: Annotated[ + float | None, + "Cursor indicating the starting point for retrieving component sets, exclusive with `end_before_cursor`. This cursor is an internally tracked integer not corresponding to any IDs.", # noqa: E501 + ] = None, + cursor_before_id: Annotated[ + float | None, + "Cursor ID indicating the point before which to retrieve component sets. It must be exclusive with the 'after' cursor.", # noqa: E501 + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getTeamComponentSets'."]: + """Fetch published component sets from a Figma team library. + + This tool retrieves a paginated list of component sets that have been published within a specified team library in Figma. It should be used when you need to access or explore available component sets in a particular Figma team.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/teams/{team_id}/component_sets".format(team_id=team_id), # noqa: UP032 + method="GET", + params=remove_none_values({ + "page_size": number_of_items_per_page, + "after": start_after_cursor, + "before": cursor_before_id, + }), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["library_content:read"])) +async def get_published_component_sets( + context: ToolContext, + main_file_key: Annotated[ + str, + "The main file key of the Figma file to list component sets from. Must not be a branch key.", # noqa: E501 + ], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getFileComponentSets'."]: + """Retrieve published component sets from a Figma file. + + Call this tool to get a list of published component sets within a specified Figma file library. Useful for accessing design components efficiently.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/component_sets".format( # noqa: UP032 + file_key=main_file_key + ), + method="GET", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["library_assets:read"])) +async def get_figma_component_set( + context: ToolContext, + component_set_key: Annotated[ + str, "The unique key identifier for the Figma component set to retrieve metadata." + ], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getComponentSet'."]: + """Retrieve metadata for a Figma component set using its key. + + Use this tool to obtain detailed metadata about a published component set in Figma by providing its unique key identifier.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/component_sets/{key}".format(key=component_set_key), # noqa: UP032 + method="GET", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["team_library_content:read"])) +async def get_team_styles( + context: ToolContext, + team_id: Annotated[ + str, "The unique identifier of the team from which to retrieve published styles." + ], + items_per_page: Annotated[ + float | None, + "Specify the number of styles to return per page. Defaults to 30 if not provided.", + ] = 30, + start_after_cursor: Annotated[ + float | None, + "Cursor to start retrieving styles after a specific ID. Cannot be used with before. Internally tracked integer.", # noqa: E501 + ] = None, + cursor_before_id: Annotated[ + float | None, + "Cursor for retrieving styles before a specific ID. Use this to paginate backwards. Exclusive with after.", # noqa: E501 + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getTeamStyles'."]: + """Retrieve a list of published styles from a team's library in Figma. + + This tool retrieves a paginated list of styles that have been published within a specified team's library in Figma. It should be called when you need access to design styles, such as colors or text styles, that a team has made available in their library.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/teams/{team_id}/styles".format(team_id=team_id), # noqa: UP032 + method="GET", + params=remove_none_values({ + "page_size": items_per_page, + "after": start_after_cursor, + "before": cursor_before_id, + }), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["library_content:read"])) +async def get_published_styles_from_file( + context: ToolContext, + main_file_key: Annotated[str, "Main file key to list styles from. Must not be a branch key."], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getFileStyles'."]: + """Retrieve published styles from a Figma file library. + + Use this tool to get a list of published styles within a specific Figma file library. Useful when you need to analyze or display the styles used in a Figma file.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/styles".format(file_key=main_file_key), # noqa: UP032 + method="GET", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["library_assets:read"])) +async def get_style_metadata( + context: ToolContext, + style_key: Annotated[str, "The unique identifier of the Figma style to retrieve metadata for."], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getStyle'."]: + """Retrieve Figma style metadata by key. + + Use this tool to get detailed metadata about a specific style in Figma using its unique key. Useful for accessing style information for design analysis or integration.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/styles/{key}".format(key=style_key), # noqa: UP032 + method="GET", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["webhooks:read"])) +async def get_figma_webhooks( + context: ToolContext, + webhook_context: Annotated[ + str | None, "Specify the context for the webhooks. Accepts 'team', 'project', or 'file'." + ] = None, + context_identifier: Annotated[ + str | None, + "The ID of the context to fetch attached webhooks. Cannot be used with plan_api_id.", + ] = None, + plan_id_for_webhooks: Annotated[ + str | None, + "The ID of your plan for retrieving webhooks across all accessible contexts. Cannot be used with context or context_id.", # noqa: E501 + ] = None, + pagination_cursor: Annotated[ + str | None, + "Cursor for pagination when using plan_api_id. Provide next_page or prev_page from previous response to navigate pages.", # noqa: E501 + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getWebhooks'."]: + """Retrieve a list of webhooks from Figma. + + Call this tool to get a list of webhooks available in your Figma context or plan. This can be used to manage and view all the webhooks you have access to, with results provided in a paginated format.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v2/webhooks", + method="GET", + params=remove_none_values({ + "context": webhook_context, + "context_id": context_identifier, + "plan_api_id": plan_id_for_webhooks, + "cursor": pagination_cursor, + }), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["webhooks:write"])) +async def create_figma_webhook( + context: ToolContext, + mode: Annotated[ + ToolMode, + "Operation mode: 'get_request_schema' returns the OpenAPI spec " + "for the request body, 'execute' performs the actual operation", + ], + request_body: Annotated[ + str | None, + "Stringified JSON representing the request body. Required when " + "mode is 'execute', ignored when mode is 'get_request_schema'", + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'postWebhook'."]: + """Create a new webhook for Figma events. + + This tool creates a webhook in Figma that triggers an event to a specified endpoint. It sends a PING event by default, unless set to PAUSED, and can be reactivated later. + + Note: Understanding the request schema is necessary to properly create + the stringified JSON input object for execution. + + Modes: + - GET_REQUEST_SCHEMA: Returns the schema. Only call if you don't + already have it. Do NOT call repeatedly if you already received + the schema. + - EXECUTE: Performs the operation with the provided request body + JSON. + + If you need the schema, call with mode='get_request_schema' ONCE, then execute. + """ # noqa: E501 + if mode == ToolMode.GET_REQUEST_SCHEMA: + return { + "request_body_schema": REQUEST_BODY_SCHEMAS["CREATEFIGMAWEBHOOK_REQUEST_BODY_SCHEMA"], + "instructions": ( + "Use the request_body_schema to construct a valid JSON object. " + "Once you have populated the object following the schema " + "structure and requirements, call this tool again with " + "mode='execute' and the stringified JSON as the " + "request_body parameter. " + "Do NOT call the schema mode again - you already have " + "the schema now." + ), + } + + # Mode is EXECUTE - validate parameters + + # Validate request body is provided (not None or empty string) + # Note: Empty objects like {} are allowed - schema validation will check if valid + if request_body is None or request_body.strip() == "": + raise RetryableToolError( + message="Request body is required when mode is 'execute'", + developer_message="The request_body parameter was null or empty string", + additional_prompt_content=( + "The request body is required to perform this operation. " + "Use the schema below to construct a valid JSON object, " + "then call this tool again in execute mode with the " + "stringified JSON as the request_body parameter.\n\n" + "Schema:\n\n" + + json.dumps( + REQUEST_BODY_SCHEMAS["CREATEFIGMAWEBHOOK_REQUEST_BODY_SCHEMA"], indent=2 + ) + ), + ) + + # Parse JSON + try: + request_data = json.loads(request_body) + except json.JSONDecodeError as e: + raise RetryableToolError( + message=f"Invalid JSON in request body: {e!s}", + developer_message=f"JSON parsing failed: {e!s}", + additional_prompt_content=( + f"The request body contains invalid JSON. Error: {e!s}\n\n" + "Please provide a valid JSON string that matches the schema " + "below, then call this tool again in execute mode.\n\n" + "Schema:\n\n" + + json.dumps( + REQUEST_BODY_SCHEMAS["CREATEFIGMAWEBHOOK_REQUEST_BODY_SCHEMA"], indent=2 + ) + ), + ) from e + + # Validate against schema + is_valid, validation_error = validate_json_against_schema( + request_data, REQUEST_BODY_SCHEMAS["CREATEFIGMAWEBHOOK_REQUEST_BODY_SCHEMA"] + ) + if not is_valid: + raise RetryableToolError( + message=f"Request body validation failed: {validation_error}", + developer_message=f"Schema validation error: {validation_error}", + additional_prompt_content=( + f"The request body does not match the required schema. " + f"Errors:\n{validation_error}\n\n" + "Please fix the validation errors above and call this tool " + "again in execute mode with the corrected JSON.\n\n" + "Required schema:\n\n" + f"{json.dumps(REQUEST_BODY_SCHEMAS['CREATEFIGMAWEBHOOK_REQUEST_BODY_SCHEMA'], indent=2)}" # noqa: E501 + ), + ) + + # Make the actual API request + response = await make_request( + url="https://api.figma.com/v2/webhooks", + method="POST", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["webhooks:read"])) +async def get_figma_webhook( + context: ToolContext, + webhook_id: Annotated[str, "Unique identifier of the Figma webhook to retrieve."], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getWebhook'."]: + """Retrieve a Figma webhook by its ID. + + Use this tool to obtain detailed information about a specific Figma webhook by providing its unique ID.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v2/webhooks/{webhook_id}".format(webhook_id=webhook_id), # noqa: UP032 + method="GET", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["webhooks:write"])) +async def update_figma_webhook( + context: ToolContext, + mode: Annotated[ + ToolMode, + "Operation mode: 'get_request_schema' returns the OpenAPI spec " + "for the request body, 'execute' performs the actual operation", + ], + webhook_id_to_update: Annotated[ + str | None, + "Provide the ID of the Figma webhook you want to update. Required when mode is 'execute', ignored when mode is 'get_request_schema'.", # noqa: E501 + ] = None, + request_body: Annotated[ + str | None, + "Stringified JSON representing the request body. Required when " + "mode is 'execute', ignored when mode is 'get_request_schema'", + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'putWebhook'."]: + """Update a Figma webhook by its ID. + + Use this tool to update the settings or parameters of an existing webhook in Figma by specifying the webhook ID. + + Note: Understanding the request schema is necessary to properly create + the stringified JSON input object for execution.\n\nThis operation also requires path parameters. + + Modes: + - GET_REQUEST_SCHEMA: Returns the schema. Only call if you don't + already have it. Do NOT call repeatedly if you already received + the schema. + - EXECUTE: Performs the operation with the provided request body + JSON.\n Note: You must also provide the required path parameters when executing. + + If you need the schema, call with mode='get_request_schema' ONCE, then execute. + """ # noqa: E501 + if mode == ToolMode.GET_REQUEST_SCHEMA: + return { + "request_body_schema": REQUEST_BODY_SCHEMAS["UPDATEFIGMAWEBHOOK_REQUEST_BODY_SCHEMA"], + "instructions": ( + "Use the request_body_schema to construct a valid JSON object. " + "Once you have populated the object following the schema " + "structure and requirements, call this tool again with " + "mode='execute' and the stringified JSON as the " + "request_body parameter along with the required path parameters. " + "Do NOT call the schema mode again - you already have " + "the schema now." + ), + } + + # Mode is EXECUTE - validate parameters + # Validate required path parameter: webhook_id_to_update + if not webhook_id_to_update: + raise RetryableToolError( + message="Invalid or missing webhook_id_to_update parameter", + developer_message=f"Path parameter " + f"'webhook_id_to_update' validation failed. " + f"Received: {webhook_id_to_update}", + additional_prompt_content=( + "The 'webhook_id_to_update' parameter is required when " + "executing this operation. " + "Please call this tool again with a valid " + "webhook_id_to_update value." + ), + ) + + # Validate request body is provided (not None or empty string) + # Note: Empty objects like {} are allowed - schema validation will check if valid + if request_body is None or request_body.strip() == "": + raise RetryableToolError( + message="Request body is required when mode is 'execute'", + developer_message="The request_body parameter was null or empty string", + additional_prompt_content=( + "The request body is required to perform this operation. " + "Use the schema below to construct a valid JSON object, " + "then call this tool again in execute mode with the " + "stringified JSON as the request_body parameter.\n\n" + "Schema:\n\n" + + json.dumps( + REQUEST_BODY_SCHEMAS["UPDATEFIGMAWEBHOOK_REQUEST_BODY_SCHEMA"], indent=2 + ) + ), + ) + + # Parse JSON + try: + request_data = json.loads(request_body) + except json.JSONDecodeError as e: + raise RetryableToolError( + message=f"Invalid JSON in request body: {e!s}", + developer_message=f"JSON parsing failed: {e!s}", + additional_prompt_content=( + f"The request body contains invalid JSON. Error: {e!s}\n\n" + "Please provide a valid JSON string that matches the schema " + "below, then call this tool again in execute mode.\n\n" + "Schema:\n\n" + + json.dumps( + REQUEST_BODY_SCHEMAS["UPDATEFIGMAWEBHOOK_REQUEST_BODY_SCHEMA"], indent=2 + ) + ), + ) from e + + # Validate against schema + is_valid, validation_error = validate_json_against_schema( + request_data, REQUEST_BODY_SCHEMAS["UPDATEFIGMAWEBHOOK_REQUEST_BODY_SCHEMA"] + ) + if not is_valid: + raise RetryableToolError( + message=f"Request body validation failed: {validation_error}", + developer_message=f"Schema validation error: {validation_error}", + additional_prompt_content=( + f"The request body does not match the required schema. " + f"Errors:\n{validation_error}\n\n" + "Please fix the validation errors above and call this tool " + "again in execute mode with the corrected JSON.\n\n" + "Required schema:\n\n" + f"{json.dumps(REQUEST_BODY_SCHEMAS['UPDATEFIGMAWEBHOOK_REQUEST_BODY_SCHEMA'], indent=2)}" # noqa: E501 + ), + ) + + # Make the actual API request + response = await make_request( + url="https://api.figma.com/v2/webhooks/{webhook_id}".format( # noqa: UP032 + webhook_id=webhook_id_to_update + ), + method="PUT", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["webhooks:write"])) +async def delete_figma_webhook( + context: ToolContext, + webhook_id_to_delete: Annotated[ + str, + "The unique identifier of the webhook you wish to delete. This ID is required for the deletion operation.", # noqa: E501 + ], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'deleteWebhook'."]: + """Delete a specified webhook in Figma. + + Use this tool to delete a specified webhook in Figma. This action is irreversible and should be called when a webhook is no longer needed.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v2/webhooks/{webhook_id}".format( # noqa: UP032 + webhook_id=webhook_id_to_delete + ), + method="DELETE", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["webhooks:read"])) +async def get_recent_webhook_requests( + context: ToolContext, + webhook_subscription_id: Annotated[ + str, "The ID of the webhook subscription for which to retrieve recent events." + ], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getWebhookRequests'."]: + """Retrieve recent webhook requests from the last week. + + Use this tool to gather webhook requests sent within the last week for debugging purposes.""" + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v2/webhooks/{webhook_id}/requests".format( # noqa: UP032 + webhook_id=webhook_subscription_id + ), + method="GET", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_variables:read"])) +async def retrieve_figma_local_variables( + context: ToolContext, + file_or_branch_key: Annotated[ + str, + "The key for the file or branch to retrieve variables from in Figma. If a branch, use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", # noqa: E501 + ], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getLocalVariables'."]: + """Retrieve local and remote variables from a Figma file. + + Use this tool to get a list of local variables created in a Figma file and any remote variables utilized, identified by their `subscribed_id`. This tool is available to full members of Enterprise organizations. It's useful for examining mode values and understanding variable usage within a file.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/variables/local".format( # noqa: UP032 + file_key=file_or_branch_key + ), + method="GET", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_variables:read"])) +async def get_published_variables( + context: ToolContext, + main_file_key: Annotated[ + str, + "The key of the Figma file to retrieve published variables from. Only use the main file key, not a branch key.", # noqa: E501 + ], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getPublishedVariables'."]: + """Retrieve published variables from a Figma file. + + Call this tool to get a list of variables that are published from a specified Figma file. The response includes variable and collection details along with `subscribed_id`. Ideal for users needing information on published variables from a file within an Enterprise organization.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/variables/published".format( # noqa: UP032 + file_key=main_file_key + ), + method="GET", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_variables:write"])) +async def manage_figma_variables( + context: ToolContext, + mode: Annotated[ + ToolMode, + "Operation mode: 'get_request_schema' returns the OpenAPI spec " + "for the request body, 'execute' performs the actual operation", + ], + file_identifier: Annotated[ + str | None, + "Specifies the Figma file or branch key to modify variables. Retrieve branch key using `GET /v1/files/:key` with `branch_data` parameter. Required when mode is 'execute', ignored when mode is 'get_request_schema'.", # noqa: E501 + ] = None, + request_body: Annotated[ + str | None, + "Stringified JSON representing the request body. Required when " + "mode is 'execute', ignored when mode is 'get_request_schema'", + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'postVariables'."]: + """Manage and organize Figma variable collections in bulk. + + This tool allows you to create, update, and delete variable collections, modes, and variables within Figma files for Enterprise members with Editor seats. Use it to handle variable operations in bulk, including setting mode values and managing temporary IDs. Ideal for organizing complex Figma projects efficiently. + + Note: Understanding the request schema is necessary to properly create + the stringified JSON input object for execution.\n\nThis operation also requires path parameters. + + Modes: + - GET_REQUEST_SCHEMA: Returns the schema. Only call if you don't + already have it. Do NOT call repeatedly if you already received + the schema. + - EXECUTE: Performs the operation with the provided request body + JSON.\n Note: You must also provide the required path parameters when executing. + + If you need the schema, call with mode='get_request_schema' ONCE, then execute. + """ # noqa: E501 + if mode == ToolMode.GET_REQUEST_SCHEMA: + return { + "request_body_schema": REQUEST_BODY_SCHEMAS["MANAGEFIGMAVARIABLES_REQUEST_BODY_SCHEMA"], + "instructions": ( + "Use the request_body_schema to construct a valid JSON object. " + "Once you have populated the object following the schema " + "structure and requirements, call this tool again with " + "mode='execute' and the stringified JSON as the " + "request_body parameter along with the required path parameters. " + "Do NOT call the schema mode again - you already have " + "the schema now." + ), + } + + # Mode is EXECUTE - validate parameters + # Validate required path parameter: file_identifier + if not file_identifier: + raise RetryableToolError( + message="Invalid or missing file_identifier parameter", + developer_message=f"Path parameter " + f"'file_identifier' validation failed. " + f"Received: {file_identifier}", + additional_prompt_content=( + "The 'file_identifier' parameter is required when " + "executing this operation. " + "Please call this tool again with a valid " + "file_identifier value." + ), + ) + + # Validate request body is provided (not None or empty string) + # Note: Empty objects like {} are allowed - schema validation will check if valid + if request_body is None or request_body.strip() == "": + raise RetryableToolError( + message="Request body is required when mode is 'execute'", + developer_message="The request_body parameter was null or empty string", + additional_prompt_content=( + "The request body is required to perform this operation. " + "Use the schema below to construct a valid JSON object, " + "then call this tool again in execute mode with the " + "stringified JSON as the request_body parameter.\n\n" + "Schema:\n\n" + + json.dumps( + REQUEST_BODY_SCHEMAS["MANAGEFIGMAVARIABLES_REQUEST_BODY_SCHEMA"], indent=2 + ) + ), + ) + + # Parse JSON + try: + request_data = json.loads(request_body) + except json.JSONDecodeError as e: + raise RetryableToolError( + message=f"Invalid JSON in request body: {e!s}", + developer_message=f"JSON parsing failed: {e!s}", + additional_prompt_content=( + f"The request body contains invalid JSON. Error: {e!s}\n\n" + "Please provide a valid JSON string that matches the schema " + "below, then call this tool again in execute mode.\n\n" + "Schema:\n\n" + + json.dumps( + REQUEST_BODY_SCHEMAS["MANAGEFIGMAVARIABLES_REQUEST_BODY_SCHEMA"], indent=2 + ) + ), + ) from e + + # Validate against schema + is_valid, validation_error = validate_json_against_schema( + request_data, REQUEST_BODY_SCHEMAS["MANAGEFIGMAVARIABLES_REQUEST_BODY_SCHEMA"] + ) + if not is_valid: + raise RetryableToolError( + message=f"Request body validation failed: {validation_error}", + developer_message=f"Schema validation error: {validation_error}", + additional_prompt_content=( + f"The request body does not match the required schema. " + f"Errors:\n{validation_error}\n\n" + "Please fix the validation errors above and call this tool " + "again in execute mode with the corrected JSON.\n\n" + "Required schema:\n\n" + f"{json.dumps(REQUEST_BODY_SCHEMAS['MANAGEFIGMAVARIABLES_REQUEST_BODY_SCHEMA'], indent=2)}" # noqa: E501 + ), + ) + + # Make the actual API request + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/variables".format(file_key=file_identifier), # noqa: UP032 + method="POST", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_dev_resources:read"])) +async def get_dev_resources( + context: ToolContext, + file_key: Annotated[ + str, + "The main file key for fetching development resources from a Figma file. Ensure it is not a branch key.", # noqa: E501 + ], + target_node_ids: Annotated[ + str | None, + "Comma separated list of node IDs to filter dev resources. If left blank, returns resources for all nodes.", # noqa: E501 + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getDevResources'."]: + """Retrieve development resources from a Figma file. + + Use this tool to gather development resources from a specific Figma file using the file key.""" + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/dev_resources".format(file_key=file_key), # noqa: UP032 + method="GET", + params=remove_none_values({"node_ids": target_node_ids}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_dev_resources:write"])) +async def create_bulk_dev_resources( + context: ToolContext, + mode: Annotated[ + ToolMode, + "Operation mode: 'get_request_schema' returns the OpenAPI spec " + "for the request body, 'execute' performs the actual operation", + ], + request_body: Annotated[ + str | None, + "Stringified JSON representing the request body. Required when " + "mode is 'execute', ignored when mode is 'get_request_schema'", + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'postDevResources'."]: + """Bulk create developer resources in multiple Figma files. + + Use this tool to create multiple developer resources across different Figma files. Successfully created resources will be listed in the response, while any errors will also be provided, indicating issues such as non-existent file keys or duplicate URLs. + + Note: Understanding the request schema is necessary to properly create + the stringified JSON input object for execution. + + Modes: + - GET_REQUEST_SCHEMA: Returns the schema. Only call if you don't + already have it. Do NOT call repeatedly if you already received + the schema. + - EXECUTE: Performs the operation with the provided request body + JSON. + + If you need the schema, call with mode='get_request_schema' ONCE, then execute. + """ # noqa: E501 + if mode == ToolMode.GET_REQUEST_SCHEMA: + return { + "request_body_schema": REQUEST_BODY_SCHEMAS[ + "CREATEBULKDEVRESOURCES_REQUEST_BODY_SCHEMA" + ], + "instructions": ( + "Use the request_body_schema to construct a valid JSON object. " + "Once you have populated the object following the schema " + "structure and requirements, call this tool again with " + "mode='execute' and the stringified JSON as the " + "request_body parameter. " + "Do NOT call the schema mode again - you already have " + "the schema now." + ), + } + + # Mode is EXECUTE - validate parameters + + # Validate request body is provided (not None or empty string) + # Note: Empty objects like {} are allowed - schema validation will check if valid + if request_body is None or request_body.strip() == "": + raise RetryableToolError( + message="Request body is required when mode is 'execute'", + developer_message="The request_body parameter was null or empty string", + additional_prompt_content=( + "The request body is required to perform this operation. " + "Use the schema below to construct a valid JSON object, " + "then call this tool again in execute mode with the " + "stringified JSON as the request_body parameter.\n\n" + "Schema:\n\n" + + json.dumps( + REQUEST_BODY_SCHEMAS["CREATEBULKDEVRESOURCES_REQUEST_BODY_SCHEMA"], indent=2 + ) + ), + ) + + # Parse JSON + try: + request_data = json.loads(request_body) + except json.JSONDecodeError as e: + raise RetryableToolError( + message=f"Invalid JSON in request body: {e!s}", + developer_message=f"JSON parsing failed: {e!s}", + additional_prompt_content=( + f"The request body contains invalid JSON. Error: {e!s}\n\n" + "Please provide a valid JSON string that matches the schema " + "below, then call this tool again in execute mode.\n\n" + "Schema:\n\n" + + json.dumps( + REQUEST_BODY_SCHEMAS["CREATEBULKDEVRESOURCES_REQUEST_BODY_SCHEMA"], indent=2 + ) + ), + ) from e + + # Validate against schema + is_valid, validation_error = validate_json_against_schema( + request_data, REQUEST_BODY_SCHEMAS["CREATEBULKDEVRESOURCES_REQUEST_BODY_SCHEMA"] + ) + if not is_valid: + raise RetryableToolError( + message=f"Request body validation failed: {validation_error}", + developer_message=f"Schema validation error: {validation_error}", + additional_prompt_content=( + f"The request body does not match the required schema. " + f"Errors:\n{validation_error}\n\n" + "Please fix the validation errors above and call this tool " + "again in execute mode with the corrected JSON.\n\n" + "Required schema:\n\n" + f"{json.dumps(REQUEST_BODY_SCHEMAS['CREATEBULKDEVRESOURCES_REQUEST_BODY_SCHEMA'], indent=2)}" # noqa: E501 + ), + ) + + # Make the actual API request + response = await make_request( + url="https://api.figma.com/v1/dev_resources", + method="POST", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_dev_resources:write"])) +async def bulk_update_figma_dev_resources( + context: ToolContext, + mode: Annotated[ + ToolMode, + "Operation mode: 'get_request_schema' returns the OpenAPI spec " + "for the request body, 'execute' performs the actual operation", + ], + request_body: Annotated[ + str | None, + "Stringified JSON representing the request body. Required when " + "mode is 'execute', ignored when mode is 'get_request_schema'", + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'putDevResources'."]: + """Update multiple Figma dev resources in bulk. + + This tool updates developer resources across multiple Figma files. It should be called when you need to apply changes to several resources at once. The response will include arrays indicating which resources were successfully updated and which encountered errors. + + Note: Understanding the request schema is necessary to properly create + the stringified JSON input object for execution. + + Modes: + - GET_REQUEST_SCHEMA: Returns the schema. Only call if you don't + already have it. Do NOT call repeatedly if you already received + the schema. + - EXECUTE: Performs the operation with the provided request body + JSON. + + If you need the schema, call with mode='get_request_schema' ONCE, then execute. + """ # noqa: E501 + if mode == ToolMode.GET_REQUEST_SCHEMA: + return { + "request_body_schema": REQUEST_BODY_SCHEMAS[ + "BULKUPDATEFIGMADEVRESOURCES_REQUEST_BODY_SCHEMA" + ], + "instructions": ( + "Use the request_body_schema to construct a valid JSON object. " + "Once you have populated the object following the schema " + "structure and requirements, call this tool again with " + "mode='execute' and the stringified JSON as the " + "request_body parameter. " + "Do NOT call the schema mode again - you already have " + "the schema now." + ), + } + + # Mode is EXECUTE - validate parameters + + # Validate request body is provided (not None or empty string) + # Note: Empty objects like {} are allowed - schema validation will check if valid + if request_body is None or request_body.strip() == "": + raise RetryableToolError( + message="Request body is required when mode is 'execute'", + developer_message="The request_body parameter was null or empty string", + additional_prompt_content=( + "The request body is required to perform this operation. " + "Use the schema below to construct a valid JSON object, " + "then call this tool again in execute mode with the " + "stringified JSON as the request_body parameter.\n\n" + "Schema:\n\n" + + json.dumps( + REQUEST_BODY_SCHEMAS["BULKUPDATEFIGMADEVRESOURCES_REQUEST_BODY_SCHEMA"], + indent=2, + ) + ), + ) + + # Parse JSON + try: + request_data = json.loads(request_body) + except json.JSONDecodeError as e: + raise RetryableToolError( + message=f"Invalid JSON in request body: {e!s}", + developer_message=f"JSON parsing failed: {e!s}", + additional_prompt_content=( + f"The request body contains invalid JSON. Error: {e!s}\n\n" + "Please provide a valid JSON string that matches the schema " + "below, then call this tool again in execute mode.\n\n" + "Schema:\n\n" + + json.dumps( + REQUEST_BODY_SCHEMAS["BULKUPDATEFIGMADEVRESOURCES_REQUEST_BODY_SCHEMA"], + indent=2, + ) + ), + ) from e + + # Validate against schema + is_valid, validation_error = validate_json_against_schema( + request_data, REQUEST_BODY_SCHEMAS["BULKUPDATEFIGMADEVRESOURCES_REQUEST_BODY_SCHEMA"] + ) + if not is_valid: + raise RetryableToolError( + message=f"Request body validation failed: {validation_error}", + developer_message=f"Schema validation error: {validation_error}", + additional_prompt_content=( + f"The request body does not match the required schema. " + f"Errors:\n{validation_error}\n\n" + "Please fix the validation errors above and call this tool " + "again in execute mode with the corrected JSON.\n\n" + "Required schema:\n\n" + f"{json.dumps(REQUEST_BODY_SCHEMAS['BULKUPDATEFIGMADEVRESOURCES_REQUEST_BODY_SCHEMA'], indent=2)}" # noqa: E501 + ), + ) + + # Make the actual API request + response = await make_request( + url="https://api.figma.com/v1/dev_resources", + method="PUT", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["file_dev_resources:write"])) +async def delete_dev_resource( + context: ToolContext, + target_file_key: Annotated[ + str, "The main file key from which to delete the dev resource. Must not be a branch key." + ], + dev_resource_id: Annotated[ + str, "The ID of the developer resource to delete from the Figma file." + ], +) -> Annotated[dict[str, Any], "Response from the API endpoint 'deleteDevResource'."]: + """Delete a dev resource from a Figma file. + + Call this tool to delete a specific developer resource from a Figma file using the file key and resource ID.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/files/{file_key}/dev_resources/{dev_resource_id}".format( # noqa: UP032 + file_key=target_file_key, dev_resource_id=dev_resource_id + ), + method="DELETE", + params=remove_none_values({}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["library_analytics:read"])) +async def get_library_analytics_component_actions( + context: ToolContext, + group_by_dimension: Annotated[ + str, + "Specify the dimension to group the analytics data by. Options are 'component' or 'team'.", + ], + library_file_key: Annotated[ + str, "The unique file key for the Figma library to retrieve analytics data from." + ], + data_page_cursor: Annotated[ + str | None, + "Cursor indicating the specific page of data to fetch, obtained from a previous API call.", + ] = None, + earliest_start_date: Annotated[ + str | None, + "ISO 8601 date string (YYYY-MM-DD) for the earliest week to include. Rounded back to the start of a week. Defaults to one year prior.", # noqa: E501 + ] = None, + latest_inclusion_date: Annotated[ + str | None, + "ISO 8601 date string (YYYY-MM-DD) of the latest week to include, rounded forward to the nearest week's end. Defaults to the latest computed week.", # noqa: E501 + ] = None, +) -> Annotated[ + dict[str, Any], "Response from the API endpoint 'getLibraryAnalyticsComponentActions'." +]: + """Get analytics for library component actions. + + Retrieve detailed data on library component actions in Figma, broken down by the specified dimension. This tool is used to gain insights into how components in a Figma library are being utilized.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/analytics/libraries/{file_key}/component/actions".format( # noqa: UP032 + file_key=library_file_key + ), + method="GET", + params=remove_none_values({ + "cursor": data_page_cursor, + "group_by": group_by_dimension, + "start_date": earliest_start_date, + "end_date": latest_inclusion_date, + }), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["library_analytics:read"])) +async def fetch_component_usage_data( + context: ToolContext, + group_by_dimension: Annotated[ + str, + "A dimension to group the returned analytics data. Choose between 'component' or 'file'.", + ], + library_file_key: Annotated[ + str, + "The file key of the library to fetch analytics data for. Required for specifying the target library.", # noqa: E501 + ], + data_page_cursor: Annotated[ + str | None, "Cursor indicating which page of data to fetch, obtained from a prior API call." + ] = None, +) -> Annotated[ + dict[str, Any], "Response from the API endpoint 'getLibraryAnalyticsComponentUsages'." +]: + """Fetch library analytics component usage data by dimension. + + This tool retrieves a list of library analytics component usage data, providing insights into how components are used, broken down by the specified dimension.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/analytics/libraries/{file_key}/component/usages".format( # noqa: UP032 + file_key=library_file_key + ), + method="GET", + params=remove_none_values({"cursor": data_page_cursor, "group_by": group_by_dimension}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["library_analytics:read"])) +async def get_library_style_actions( + context: ToolContext, + group_by_dimension: Annotated[ + str, "Specify the dimension ('style' or 'team') to group the returned analytics data by." + ], + library_file_key: Annotated[ + str, "The unique file key of the Figma library to retrieve analytics data for." + ], + pagination_cursor: Annotated[ + str | None, + "A cursor to indicate which page of data to fetch. Obtain this from a prior API call.", + ] = None, + earliest_week_start_date: Annotated[ + str | None, + "ISO 8601 date string (YYYY-MM-DD) for the earliest week to include. Dates round back to the nearest week start. Defaults to one year prior.", # noqa: E501 + ] = None, + end_date: Annotated[ + str | None, + "ISO 8601 date string (YYYY-MM-DD) for the latest week to include, rounded to the week's end. Defaults to the latest computed week if not specified.", # noqa: E501 + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getLibraryAnalyticsStyleActions'."]: + """Retrieve library style analytics actions data by dimension. + + Use this tool to obtain detailed actions data for styles in a Figma library, categorized by the specified dimension. Ideal for analyzing how styles are used or modified.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/analytics/libraries/{file_key}/style/actions".format( # noqa: UP032 + file_key=library_file_key + ), + method="GET", + params=remove_none_values({ + "cursor": pagination_cursor, + "group_by": group_by_dimension, + "start_date": earliest_week_start_date, + "end_date": end_date, + }), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["library_analytics:read"])) +async def get_library_style_usage_data( + context: ToolContext, + group_by_dimension: Annotated[ + str, "Dimension to group the returned analytics data by. Options are 'style' or 'file'." + ], + library_file_key: Annotated[ + str, + "The file key of the Figma library to fetch analytics data for. This is required to specify the source library.", # noqa: E501 + ], + pagination_cursor: Annotated[ + str | None, + "Cursor indicating which page of data to fetch, obtained from a previous API call.", + ] = None, +) -> Annotated[dict[str, Any], "Response from the API endpoint 'getLibraryAnalyticsStyleUsages'."]: + """Retrieve style usage data from Figma library analytics. + + This tool returns library analytics style usage data from Figma, broken down by the requested dimension. It should be used to analyze style usage within a specific Figma library file.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/analytics/libraries/{file_key}/style/usages".format( # noqa: UP032 + file_key=library_file_key + ), + method="GET", + params=remove_none_values({"cursor": pagination_cursor, "group_by": group_by_dimension}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["library_analytics:read"])) +async def fetch_library_analytics_variable_actions( + context: ToolContext, + group_by_dimension: Annotated[ + str, "A dimension to group the returned analytics data by. Options: 'variable', 'team'." + ], + library_file_key: Annotated[ + str, "The file key of the library for which to fetch analytics data." + ], + page_cursor: Annotated[ + str | None, + "Cursor to indicate which page of data to fetch, obtained from a previous API call.", + ] = None, + earliest_week_start_date: Annotated[ + str | None, + "ISO 8601 date string (YYYY-MM-DD) representing the earliest week to include. Rounded back to the nearest week's start. Defaults to one year prior.", # noqa: E501 + ] = None, + end_date: Annotated[ + str | None, + "ISO 8601 date string (YYYY-MM-DD) for the latest week to include. Defaults to the latest computed week.", # noqa: E501 + ] = None, +) -> Annotated[ + dict[str, Any], "Response from the API endpoint 'getLibraryAnalyticsVariableActions'." +]: + """Retrieve library analytics variable actions data from Figma. + + Call this tool to obtain a breakdown of library analytics variable actions data from Figma based on a specific dimension.""" # noqa: E501 + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/analytics/libraries/{file_key}/variable/actions".format( # noqa: UP032 + file_key=library_file_key + ), + method="GET", + params=remove_none_values({ + "cursor": page_cursor, + "group_by": group_by_dimension, + "start_date": earliest_week_start_date, + "end_date": end_date, + }), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} + + +@tool(requires_auth=OAuth2(id="arcade-figma", scopes=["library_analytics:read"])) +async def get_library_analytics_variable_usages( + context: ToolContext, + group_by_dimension: Annotated[ + str, "Specifies the dimension ('variable' or 'file') for grouping library analytics data." + ], + library_file_key: Annotated[str, "The unique key of the library to fetch analytics data from."], + page_cursor: Annotated[ + str | None, + "A token to fetch the specific page of results, received from a previous API call.", + ] = None, +) -> Annotated[ + dict[str, Any], "Response from the API endpoint 'getLibraryAnalyticsVariableUsages'." +]: + """Retrieve analytics on library variable usage. + + Fetches a breakdown of library analytics variable usage data by the specified dimension.""" + request_data = remove_none_values({}) + response = await make_request( + url="https://api.figma.com/v1/analytics/libraries/{file_key}/variable/usages".format( # noqa: UP032 + file_key=library_file_key + ), + method="GET", + params=remove_none_values({"cursor": page_cursor, "group_by": group_by_dimension}), + headers=remove_none_values({ + "Content-Type": "application/json", + "Authorization": "Bearer {authorization}".format( # noqa: UP032 + authorization=context.get_auth_token_or_empty() + ), + }), + data=json.dumps(request_data) if request_data else None, + ) + try: + return {"response_json": response.json()} + except Exception: + return {"response_text": response.text} diff --git a/toolkits/figma_api/arcade_figma_api/tools/request_body_schemas.py b/toolkits/figma_api/arcade_figma_api/tools/request_body_schemas.py new file mode 100644 index 00000000..0fe7eac6 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/tools/request_body_schemas.py @@ -0,0 +1,1530 @@ +"""Request Body Schemas for API Tools + +DO NOT EDIT THIS MODULE DIRECTLY. + +THIS MODULE WAS AUTO-GENERATED AND CONTAINS OpenAPI REQUEST BODY SCHEMAS +FOR TOOLS WITH COMPLEX REQUEST BODIES. ANY CHANGES TO THIS MODULE WILL +BE OVERWRITTEN BY THE TRANSPILER. +""" + +from typing import Any + +REQUEST_BODY_SCHEMAS: dict[str, Any] = { + "ADDCOMMENTTOFIGMAFILE_REQUEST_BODY_SCHEMA": { + "properties": { + "client_meta": { + "description": "The position where to place the comment.", + "oneOf": [ + { + "description": "A 2d vector.", + "properties": { + "x": {"description": "X coordinate of the vector.", "type": "number"}, + "y": {"description": "Y coordinate of the vector.", "type": "number"}, + }, + "required": ["x", "y"], + "type": "object", + }, + { + "description": "Position of a comment " + "relative to the frame to " + "which it is attached.", + "properties": { + "node_id": { + "description": "Unique id specifying the frame.", + "type": "string", + }, + "node_offset": { + "description": "A 2d vector.", + "properties": { + "x": { + "description": "X coordinate of the vector.", + "type": "number", + }, + "y": { + "description": "Y coordinate of the vector.", + "type": "number", + }, + }, + "required": ["x", "y"], + "type": "object", + }, + }, + "required": ["node_id", "node_offset"], + "type": "object", + }, + { + "description": "Position of a region comment on the canvas.", + "properties": { + "comment_pin_corner": { + "default": "bottom-right", + "description": "The " + "corner " + "of " + "the " + "comment " + "region " + "to " + "pin " + "to " + "the " + "node's " + "corner " + "as " + "a " + "string " + "enum.", + "enum": ["top-left", "top-right", "bottom-left", "bottom-right"], + "type": "string", + }, + "region_height": { + "description": "The " + "height " + "of " + "the " + "comment " + "region. " + "Must " + "be " + "greater " + "than " + "0.", + "type": "number", + }, + "region_width": { + "description": "The " + "width " + "of " + "the " + "comment " + "region. " + "Must " + "be " + "greater " + "than " + "0.", + "type": "number", + }, + "x": {"description": "X coordinate of the position.", "type": "number"}, + "y": {"description": "Y coordinate of the position.", "type": "number"}, + }, + "required": ["x", "y", "region_height", "region_width"], + "type": "object", + }, + { + "description": "Position of a region " + "comment relative to the " + "frame to which it is " + "attached.", + "properties": { + "comment_pin_corner": { + "default": "bottom-right", + "description": "The " + "corner " + "of " + "the " + "comment " + "region " + "to " + "pin " + "to " + "the " + "node's " + "corner " + "as " + "a " + "string " + "enum.", + "enum": ["top-left", "top-right", "bottom-left", "bottom-right"], + "type": "string", + }, + "node_id": { + "description": "Unique id specifying the frame.", + "type": "string", + }, + "node_offset": { + "description": "A 2d vector.", + "properties": { + "x": { + "description": "X coordinate of the vector.", + "type": "number", + }, + "y": { + "description": "Y coordinate of the vector.", + "type": "number", + }, + }, + "required": ["x", "y"], + "type": "object", + }, + "region_height": { + "description": "The " + "height " + "of " + "the " + "comment " + "region. " + "Must " + "be " + "greater " + "than " + "0.", + "type": "number", + }, + "region_width": { + "description": "The " + "width " + "of " + "the " + "comment " + "region. " + "Must " + "be " + "greater " + "than " + "0.", + "type": "number", + }, + }, + "required": ["node_id", "node_offset", "region_height", "region_width"], + "type": "object", + }, + ], + }, + "comment_id": { + "description": "The ID of the comment to reply to, if " + "any. This must be a root comment. You " + "cannot reply to other replies (a " + "comment that has a parent_id).", + "type": "string", + }, + "message": { + "description": "The text contents of the comment to post.", + "type": "string", + }, + }, + "required": ["message"], + "type": "object", + }, + "ADDFIGMACOMMENTREACTION_REQUEST_BODY_SCHEMA": { + "properties": { + "emoji": { + "description": "The emoji type of reaction as shortcode " + "(e.g. `:heart:`, `:+1::skin-tone-2:`). The " + "list of accepted emoji shortcodes can be " + "found in [this " + "file](https://raw.githubusercontent.com/missive/emoji-mart/main/packages/emoji-mart-data/sets/14/native.json) " # noqa: E501 + "under the top-level emojis and aliases " + "fields, with optional skin tone modifiers " + "when applicable.", + "type": "string", + } + }, + "required": ["emoji"], + "type": "object", + }, + "CREATEFIGMAWEBHOOK_REQUEST_BODY_SCHEMA": { + "properties": { + "context": { + "description": "Context to create the webhook for. Must be " + '"team", "project", or "file".', + "type": "string", + }, + "context_id": { + "description": "The id of the context you want to receive updates about.", + "type": "string", + }, + "description": { + "description": "User provided description or name for " + "the webhook. Max length 150 " + "characters.", + "type": "string", + }, + "endpoint": { + "description": "The HTTP endpoint that will receive a " + "POST request when the event triggers. Max " + "length 2048 characters.", + "type": "string", + }, + "event_type": { + "description": "An enum representing the possible " + "events that a webhook can subscribe to", + "enum": [ + "PING", + "FILE_UPDATE", + "FILE_VERSION_UPDATE", + "FILE_DELETE", + "LIBRARY_PUBLISH", + "FILE_COMMENT", + "DEV_MODE_STATUS_UPDATE", + ], + "type": "string", + }, + "passcode": { + "description": "String that will be passed back to your " + "webhook endpoint to verify that it is " + "being called by Figma. Max length 100 " + "characters.", + "type": "string", + }, + "status": { + "description": "An enum representing the possible statuses " + "you can set a webhook to:\n" + "- `ACTIVE`: The webhook is healthy and " + "receive all events\n" + "- `PAUSED`: The webhook is paused and will " + "not receive any events", + "enum": ["ACTIVE", "PAUSED"], + "type": "string", + }, + "team_id": { + "deprecated": True, + "description": "Team id to receive updates about. This is " + "deprecated, use 'context' and 'context_id' " + "instead.", + "type": "string", + }, + }, + "required": ["event_type", "endpoint", "passcode", "context", "context_id"], + "type": "object", + }, + "UPDATEFIGMAWEBHOOK_REQUEST_BODY_SCHEMA": { + "properties": { + "description": { + "description": "User provided description or name for " + "the webhook. Max length 150 " + "characters.", + "type": "string", + }, + "endpoint": { + "description": "The HTTP endpoint that will receive a " + "POST request when the event triggers. Max " + "length 2048 characters.", + "type": "string", + }, + "event_type": { + "description": "An enum representing the possible " + "events that a webhook can subscribe to", + "enum": [ + "PING", + "FILE_UPDATE", + "FILE_VERSION_UPDATE", + "FILE_DELETE", + "LIBRARY_PUBLISH", + "FILE_COMMENT", + "DEV_MODE_STATUS_UPDATE", + ], + "type": "string", + }, + "passcode": { + "description": "String that will be passed back to your " + "webhook endpoint to verify that it is " + "being called by Figma. Max length 100 " + "characters.", + "type": "string", + }, + "status": { + "description": "An enum representing the possible statuses " + "you can set a webhook to:\n" + "- `ACTIVE`: The webhook is healthy and " + "receive all events\n" + "- `PAUSED`: The webhook is paused and will " + "not receive any events", + "enum": ["ACTIVE", "PAUSED"], + "type": "string", + }, + }, + "required": ["event_type", "team_id", "endpoint", "passcode"], + "type": "object", + }, + "MANAGEFIGMAVARIABLES_REQUEST_BODY_SCHEMA": { + "minProperties": 1, + "properties": { + "variableCollections": { + "description": "For creating, updating, and deleting variable collections.", + "items": { + "discriminator": { + "mapping": { + "CREATE": "#/components/schemas/VariableCollectionCreate", + "DELETE": "#/components/schemas/VariableCollectionDelete", + "UPDATE": "#/components/schemas/VariableCollectionUpdate", + }, + "propertyName": "action", + }, + "oneOf": [ + { + "description": "An object " + "that " + "contains " + "details " + "about " + "creating " + "a " + "`VariableCollection`.", + "properties": { + "action": { + "description": "The " + "action " + "to " + "perform " + "for " + "the " + "variable " + "collection.", + "enum": ["CREATE"], + "type": "string", + }, + "hiddenFromPublishing": { + "default": False, + "description": "Whether " + "this " + "variable " + "collection " + "is " + "hidden " + "when " + "publishing " + "the " + "current " + "file " + "as " + "a " + "library.", + "type": "boolean", + }, + "id": { + "description": "A temporary id for this variable collection.", + "type": "string", + }, + "initialModeId": { + "description": "The " + "initial " + "mode " + "refers " + "to " + "the " + "mode " + "that " + "is " + "created " + "by " + "default. " + "You " + "can " + "set " + "a " + "temporary " + "id " + "here, " + "in " + "order " + "to " + "reference " + "this " + "mode " + "later " + "in " + "this " + "request.", + "type": "string", + }, + "name": { + "description": "The name of this variable collection.", + "type": "string", + }, + }, + "required": ["action", "name"], + "type": "object", + }, + { + "description": "An object " + "that " + "contains " + "details " + "about " + "updating " + "a " + "`VariableCollection`.", + "properties": { + "action": { + "description": "The " + "action " + "to " + "perform " + "for " + "the " + "variable " + "collection.", + "enum": ["UPDATE"], + "type": "string", + }, + "hiddenFromPublishing": { + "default": False, + "description": "Whether " + "this " + "variable " + "collection " + "is " + "hidden " + "when " + "publishing " + "the " + "current " + "file " + "as " + "a " + "library.", + "type": "boolean", + }, + "id": { + "description": "The id of the variable collection to update.", + "type": "string", + }, + "name": { + "description": "The name of this variable collection.", + "type": "string", + }, + }, + "required": ["action", "id"], + "type": "object", + }, + { + "description": "An object " + "that " + "contains " + "details " + "about " + "deleting " + "a " + "`VariableCollection`.", + "properties": { + "action": { + "description": "The " + "action " + "to " + "perform " + "for " + "the " + "variable " + "collection.", + "enum": ["DELETE"], + "type": "string", + }, + "id": { + "description": "The id of the variable collection to delete.", + "type": "string", + }, + }, + "required": ["action", "id"], + "type": "object", + }, + ], + }, + "type": "array", + }, + "variableModeValues": { + "description": "For setting a specific value, given a variable and a mode.", + "items": { + "description": "An object that " + "represents a value " + "for a given mode of a " + "variable. All " + "properties are " + "required.", + "properties": { + "modeId": { + "description": "Must " + "correspond " + "to " + "a " + "mode " + "in " + "the " + "variable " + "collection " + "that " + "contains " + "the " + "target " + "variable.", + "type": "string", + }, + "value": { + "description": "The " + "value " + "for " + "the " + "variable. " + "The " + "value " + "must " + "match " + "the " + "variable's " + "type. " + "If " + "setting " + "to " + "a " + "variable " + "alias, " + "the " + "alias " + "must " + "resolve " + "to " + "this " + "type.", + "oneOf": [ + {"type": "boolean"}, + {"type": "number"}, + {"type": "string"}, + { + "description": "An RGB color", + "properties": { + "b": { + "description": "Blue channel value, between 0 and 1.", + "maximum": 1, + "minimum": 0, + "type": "number", + }, + "g": { + "description": "Green channel value, between 0 and 1.", + "maximum": 1, + "minimum": 0, + "type": "number", + }, + "r": { + "description": "Red channel value, between 0 and 1.", + "maximum": 1, + "minimum": 0, + "type": "number", + }, + }, + "required": ["r", "g", "b"], + "type": "object", + }, + { + "description": "An RGBA color", + "properties": { + "a": { + "description": "Alpha channel value, between 0 and 1.", + "maximum": 1, + "minimum": 0, + "type": "number", + }, + "b": { + "description": "Blue channel value, between 0 and 1.", + "maximum": 1, + "minimum": 0, + "type": "number", + }, + "g": { + "description": "Green channel value, between 0 and 1.", + "maximum": 1, + "minimum": 0, + "type": "number", + }, + "r": { + "description": "Red channel value, between 0 and 1.", + "maximum": 1, + "minimum": 0, + "type": "number", + }, + }, + "required": ["r", "g", "b", "a"], + "type": "object", + }, + { + "description": "Contains a variable alias", + "properties": { + "id": { + "description": "The " + "id " + "of " + "the " + "variable " + "that " + "the " + "current " + "variable " + "is " + "aliased " + "to. " + "This " + "variable " + "can " + "be " + "a " + "local " + "or " + "remote " + "variable, " + "and " + "both " + "can " + "be " + "retrieved " + "via " + "the " + "GET " + "/v1/files/:file_key/variables/local " + "endpoint.", + "type": "string", + }, + "type": {"enum": ["VARIABLE_ALIAS"], "type": "string"}, + }, + "required": ["type", "id"], + "type": "object", + }, + ], + }, + "variableId": { + "description": "The " + "target " + "variable. " + "You " + "can " + "use " + "the " + "temporary " + "id " + "of " + "a " + "variable.", + "type": "string", + }, + }, + "required": ["variableId", "modeId", "value"], + "type": "object", + }, + "type": "array", + }, + "variableModes": { + "description": "For creating, updating, and deleting " + "modes within variable collections.", + "items": { + "discriminator": { + "mapping": { + "CREATE": "#/components/schemas/VariableModeCreate", + "DELETE": "#/components/schemas/VariableModeDelete", + "UPDATE": "#/components/schemas/VariableModeUpdate", + }, + "propertyName": "action", + }, + "oneOf": [ + { + "description": "An object that " + "contains " + "details about " + "creating a " + "`VariableMode`.", + "properties": { + "action": { + "description": "The action to perform for the variable mode.", + "enum": ["CREATE"], + "type": "string", + }, + "id": { + "description": "A temporary id for this variable mode.", + "type": "string", + }, + "name": { + "description": "The name of this variable mode.", + "type": "string", + }, + "variableCollectionId": { + "description": "The " + "variable " + "collection " + "that " + "will " + "contain " + "the " + "mode. " + "You " + "can " + "use " + "the " + "temporary " + "id " + "of " + "a " + "variable " + "collection.", + "type": "string", + }, + }, + "required": ["action", "name", "variableCollectionId"], + "type": "object", + }, + { + "description": "An object that " + "contains " + "details about " + "updating a " + "`VariableMode`.", + "properties": { + "action": { + "description": "The action to perform for the variable mode.", + "enum": ["UPDATE"], + "type": "string", + }, + "id": { + "description": "The id of the variable mode to update.", + "type": "string", + }, + "name": { + "description": "The name of this variable mode.", + "type": "string", + }, + "variableCollectionId": { + "description": "The " + "variable " + "collection " + "that " + "contains " + "the " + "mode.", + "type": "string", + }, + }, + "required": ["action", "id", "variableCollectionId"], + "type": "object", + }, + { + "description": "An object that " + "contains " + "details about " + "deleting a " + "`VariableMode`.", + "properties": { + "action": { + "description": "The action to perform for the variable mode.", + "enum": ["DELETE"], + "type": "string", + }, + "id": { + "description": "The id of the variable mode to delete.", + "type": "string", + }, + }, + "required": ["action", "id"], + "type": "object", + }, + ], + }, + "type": "array", + }, + "variables": { + "description": "For creating, updating, and deleting variables.", + "items": { + "discriminator": { + "mapping": { + "CREATE": "#/components/schemas/VariableCreate", + "DELETE": "#/components/schemas/VariableDelete", + "UPDATE": "#/components/schemas/VariableUpdate", + }, + "propertyName": "action", + }, + "oneOf": [ + { + "description": "An object that " + "contains details " + "about creating a " + "`Variable`.", + "properties": { + "action": { + "description": "The action to perform for the variable.", + "enum": ["CREATE"], + "type": "string", + }, + "codeSyntax": { + "description": "An " + "object " + "containing " + "platform-specific " + "code " + "syntax " + "definitions " + "for " + "a " + "variable. " + "All " + "platforms " + "are " + "optional.", + "properties": { + "ANDROID": {"type": "string"}, + "WEB": {"type": "string"}, + "iOS": {"type": "string"}, + }, + "type": "object", + }, + "description": { + "description": "The description of this variable.", + "type": "string", + }, + "hiddenFromPublishing": { + "default": False, + "description": "Whether " + "this " + "variable " + "is " + "hidden " + "when " + "publishing " + "the " + "current " + "file " + "as " + "a " + "library.", + "type": "boolean", + }, + "id": { + "description": "A temporary id for this variable.", + "type": "string", + }, + "name": { + "description": "The name of this variable.", + "type": "string", + }, + "resolvedType": { + "description": "Defines " + "the " + "types " + "of " + "data " + "a " + "VariableData " + "object " + "can " + "eventually " + "equal", + "enum": ["BOOLEAN", "FLOAT", "STRING", "COLOR"], + "type": "string", + }, + "scopes": { + "description": "An " + "array " + "of " + "scopes " + "in " + "the " + "UI " + "where " + "this " + "variable " + "is " + "shown. " + "Setting " + "this " + "property " + "will " + "show/hide " + "this " + "variable " + "in " + "the " + "variable " + "picker " + "UI " + "for " + "different " + "fields.", + "items": { + "description": "Scopes " + "allow " + "a " + "variable " + "to " + "be " + "shown " + "or " + "hidden " + "in " + "the " + "variable " + "picker " + "for " + "various " + "fields. " + "This " + "declutters " + "the " + "Figma " + "UI " + "if " + "you " + "have " + "a " + "large " + "number " + "of " + "variables. " + "Variable " + "scopes " + "are " + "currently " + "supported " + "on " + "`FLOAT`, " + "`STRING`, " + "and " + "`COLOR` " + "variables.\n" + "\n" + "`ALL_SCOPES` " + "is " + "a " + "special " + "scope " + "that " + "means " + "that " + "the " + "variable " + "will " + "be " + "shown " + "in " + "the " + "variable " + "picker " + "for " + "all " + "variable " + "fields. " + "If " + "`ALL_SCOPES` " + "is " + "set, " + "no " + "additional " + "scopes " + "can " + "be " + "set.\n" + "\n" + "`ALL_FILLS` " + "is " + "a " + "special " + "scope " + "that " + "means " + "that " + "the " + "variable " + "will " + "be " + "shown " + "in " + "the " + "variable " + "picker " + "for " + "all " + "fill " + "fields. " + "If " + "`ALL_FILLS` " + "is " + "set, " + "no " + "additional " + "fill " + "scopes " + "can " + "be " + "set.\n" + "\n" + "Valid " + "scopes " + "for " + "`FLOAT` " + "variables:\n" + "- " + "`ALL_SCOPES`\n" + "- " + "`TEXT_CONTENT`\n" + "- " + "`WIDTH_HEIGHT`\n" + "- " + "`GAP`\n" + "- " + "`STROKE_FLOAT`\n" + "- " + "`EFFECT_FLOAT`\n" + "- " + "`OPACITY`\n" + "- " + "`FONT_WEIGHT`\n" + "- " + "`FONT_SIZE`\n" + "- " + "`LINE_HEIGHT`\n" + "- " + "`LETTER_SPACING`\n" + "- " + "`PARAGRAPH_SPACING`\n" + "- " + "`PARAGRAPH_INDENT`\n" + "\n" + "Valid " + "scopes " + "for " + "`STRING` " + "variables:\n" + "- " + "`ALL_SCOPES`\n" + "- " + "`TEXT_CONTENT`\n" + "- " + "`FONT_FAMILY`\n" + "- " + "`FONT_STYLE`\n" + "\n" + "Valid " + "scopes " + "for " + "`COLOR` " + "variables:\n" + "- " + "`ALL_SCOPES`\n" + "- " + "`ALL_FILLS`\n" + "- " + "`FRAME_FILL`\n" + "- " + "`SHAPE_FILL`\n" + "- " + "`TEXT_FILL`\n" + "- " + "`STROKE_COLOR`\n" + "- " + "`EFFECT_COLOR`", + "enum": [ + "ALL_SCOPES", + "TEXT_CONTENT", + "CORNER_RADIUS", + "WIDTH_HEIGHT", + "GAP", + "ALL_FILLS", + "FRAME_FILL", + "SHAPE_FILL", + "TEXT_FILL", + "STROKE_COLOR", + "STROKE_FLOAT", + "EFFECT_FLOAT", + "EFFECT_COLOR", + "OPACITY", + "FONT_FAMILY", + "FONT_STYLE", + "FONT_WEIGHT", + "FONT_SIZE", + "LINE_HEIGHT", + "LETTER_SPACING", + "PARAGRAPH_SPACING", + "PARAGRAPH_INDENT", + "FONT_VARIATIONS", + ], + "type": "string", + }, + "type": "array", + }, + "variableCollectionId": { + "description": "The " + "variable " + "collection " + "that " + "will " + "contain " + "the " + "variable. " + "You " + "can " + "use " + "the " + "temporary " + "id " + "of " + "a " + "variable " + "collection.", + "type": "string", + }, + }, + "required": ["action", "name", "variableCollectionId", "resolvedType"], + "type": "object", + }, + { + "description": "An object that " + "contains details " + "about updating a " + "`Variable`.", + "properties": { + "action": { + "description": "The action to perform for the variable.", + "enum": ["UPDATE"], + "type": "string", + }, + "codeSyntax": { + "description": "An " + "object " + "containing " + "platform-specific " + "code " + "syntax " + "definitions " + "for " + "a " + "variable. " + "All " + "platforms " + "are " + "optional.", + "properties": { + "ANDROID": {"type": "string"}, + "WEB": {"type": "string"}, + "iOS": {"type": "string"}, + }, + "type": "object", + }, + "description": { + "description": "The description of this variable.", + "type": "string", + }, + "hiddenFromPublishing": { + "default": False, + "description": "Whether " + "this " + "variable " + "is " + "hidden " + "when " + "publishing " + "the " + "current " + "file " + "as " + "a " + "library.", + "type": "boolean", + }, + "id": { + "description": "The id of the variable to update.", + "type": "string", + }, + "name": { + "description": "The name of this variable.", + "type": "string", + }, + "scopes": { + "description": "An " + "array " + "of " + "scopes " + "in " + "the " + "UI " + "where " + "this " + "variable " + "is " + "shown. " + "Setting " + "this " + "property " + "will " + "show/hide " + "this " + "variable " + "in " + "the " + "variable " + "picker " + "UI " + "for " + "different " + "fields.", + "items": { + "description": "Scopes " + "allow " + "a " + "variable " + "to " + "be " + "shown " + "or " + "hidden " + "in " + "the " + "variable " + "picker " + "for " + "various " + "fields. " + "This " + "declutters " + "the " + "Figma " + "UI " + "if " + "you " + "have " + "a " + "large " + "number " + "of " + "variables. " + "Variable " + "scopes " + "are " + "currently " + "supported " + "on " + "`FLOAT`, " + "`STRING`, " + "and " + "`COLOR` " + "variables.\n" + "\n" + "`ALL_SCOPES` " + "is " + "a " + "special " + "scope " + "that " + "means " + "that " + "the " + "variable " + "will " + "be " + "shown " + "in " + "the " + "variable " + "picker " + "for " + "all " + "variable " + "fields. " + "If " + "`ALL_SCOPES` " + "is " + "set, " + "no " + "additional " + "scopes " + "can " + "be " + "set.\n" + "\n" + "`ALL_FILLS` " + "is " + "a " + "special " + "scope " + "that " + "means " + "that " + "the " + "variable " + "will " + "be " + "shown " + "in " + "the " + "variable " + "picker " + "for " + "all " + "fill " + "fields. " + "If " + "`ALL_FILLS` " + "is " + "set, " + "no " + "additional " + "fill " + "scopes " + "can " + "be " + "set.\n" + "\n" + "Valid " + "scopes " + "for " + "`FLOAT` " + "variables:\n" + "- " + "`ALL_SCOPES`\n" + "- " + "`TEXT_CONTENT`\n" + "- " + "`WIDTH_HEIGHT`\n" + "- " + "`GAP`\n" + "- " + "`STROKE_FLOAT`\n" + "- " + "`EFFECT_FLOAT`\n" + "- " + "`OPACITY`\n" + "- " + "`FONT_WEIGHT`\n" + "- " + "`FONT_SIZE`\n" + "- " + "`LINE_HEIGHT`\n" + "- " + "`LETTER_SPACING`\n" + "- " + "`PARAGRAPH_SPACING`\n" + "- " + "`PARAGRAPH_INDENT`\n" + "\n" + "Valid " + "scopes " + "for " + "`STRING` " + "variables:\n" + "- " + "`ALL_SCOPES`\n" + "- " + "`TEXT_CONTENT`\n" + "- " + "`FONT_FAMILY`\n" + "- " + "`FONT_STYLE`\n" + "\n" + "Valid " + "scopes " + "for " + "`COLOR` " + "variables:\n" + "- " + "`ALL_SCOPES`\n" + "- " + "`ALL_FILLS`\n" + "- " + "`FRAME_FILL`\n" + "- " + "`SHAPE_FILL`\n" + "- " + "`TEXT_FILL`\n" + "- " + "`STROKE_COLOR`\n" + "- " + "`EFFECT_COLOR`", + "enum": [ + "ALL_SCOPES", + "TEXT_CONTENT", + "CORNER_RADIUS", + "WIDTH_HEIGHT", + "GAP", + "ALL_FILLS", + "FRAME_FILL", + "SHAPE_FILL", + "TEXT_FILL", + "STROKE_COLOR", + "STROKE_FLOAT", + "EFFECT_FLOAT", + "EFFECT_COLOR", + "OPACITY", + "FONT_FAMILY", + "FONT_STYLE", + "FONT_WEIGHT", + "FONT_SIZE", + "LINE_HEIGHT", + "LETTER_SPACING", + "PARAGRAPH_SPACING", + "PARAGRAPH_INDENT", + "FONT_VARIATIONS", + ], + "type": "string", + }, + "type": "array", + }, + }, + "required": ["action", "id"], + "type": "object", + }, + { + "description": "An object that " + "contains details " + "about deleting a " + "`Variable`.", + "properties": { + "action": { + "description": "The action to perform for the variable.", + "enum": ["DELETE"], + "type": "string", + }, + "id": { + "description": "The id of the variable to delete.", + "type": "string", + }, + }, + "required": ["action", "id"], + "type": "object", + }, + ], + }, + "type": "array", + }, + }, + "type": "object", + }, + "CREATEBULKDEVRESOURCES_REQUEST_BODY_SCHEMA": { + "properties": { + "dev_resources": { + "description": "An array of dev resources.", + "items": { + "properties": { + "file_key": { + "description": "The file key where the dev resource belongs.", + "type": "string", + }, + "name": {"description": "The name of the dev resource.", "type": "string"}, + "node_id": { + "description": "The target node to attach the dev resource to.", + "type": "string", + }, + "url": {"description": "The URL of the dev resource.", "type": "string"}, + }, + "required": ["name", "url", "file_key", "node_id"], + "type": "object", + }, + "type": "array", + } + }, + "required": ["dev_resources"], + "type": "object", + }, + "BULKUPDATEFIGMADEVRESOURCES_REQUEST_BODY_SCHEMA": { + "properties": { + "dev_resources": { + "description": "An array of dev resources.", + "items": { + "properties": { + "id": { + "description": "Unique identifier of the dev resource", + "type": "string", + }, + "name": {"description": "The name of the dev resource.", "type": "string"}, + "url": {"description": "The URL of the dev resource.", "type": "string"}, + }, + "required": ["id"], + "type": "object", + }, + "type": "array", + } + }, + "required": ["dev_resources"], + "type": "object", + }, +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/AddCommentToFigmaFile.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/AddCommentToFigmaFile.json new file mode 100644 index 00000000..4044d387 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/AddCommentToFigmaFile.json @@ -0,0 +1,194 @@ +{ + "name": "AddCommentToFigmaFile", + "fully_qualified_name": "FigmaApi.AddCommentToFigmaFile@0.1.0", + "description": "Posts a new comment on a Figma file.\n\nUse this tool to post a new comment on a specified file in Figma, identified by file_key.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "figma_file_key", + "required": true, + "description": "File or branch key for the Figma file where the comment will be added. Retrieve this using `GET /v1/files/:key` with the `branch_data` query param for branch keys.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to add comments in. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "comment_details", + "required": true, + "description": "JSON with details of the comment. Include 'message', 'comment_id' (if replying), and 'client_meta' for position.", + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": { + "message": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The text contents of the comment to post." + }, + "comment_id": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The ID of the comment to reply to, if any. This must be a root comment. You cannot reply to other replies (a comment that has a parent_id)." + }, + "client_meta": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The position where to place the comment." + } + }, + "inner_properties": null, + "description": "Comment to post." + }, + "inferrable": true, + "http_endpoint_parameter_name": "requestBody" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'postComment'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_comments:write" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/comments", + "http_method": "POST", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "file_key", + "tool_parameter_name": "figma_file_key", + "description": "File to add comments in. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to add comments in. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "requestBody", + "tool_parameter_name": "comment_details", + "description": "Comment to post.", + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": { + "message": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The text contents of the comment to post." + }, + "comment_id": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The ID of the comment to reply to, if any. This must be a root comment. You cannot reply to other replies (a comment that has a parent_id)." + }, + "client_meta": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The position where to place the comment." + } + }, + "inner_properties": null, + "description": "Comment to post." + }, + "accepted_as": "body", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": "{\n \"description\": \"Comment to post.\",\n \"required\": true,\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"message\": {\n \"type\": \"string\",\n \"description\": \"The text contents of the comment to post.\"\n },\n \"comment_id\": {\n \"type\": \"string\",\n \"description\": \"The ID of the comment to reply to, if any. This must be a root comment. You cannot reply to other replies (a comment that has a parent_id).\"\n },\n \"client_meta\": {\n \"description\": \"The position where to place the comment.\",\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"description\": \"A 2d vector.\",\n \"properties\": {\n \"x\": {\n \"type\": \"number\",\n \"description\": \"X coordinate of the vector.\"\n },\n \"y\": {\n \"type\": \"number\",\n \"description\": \"Y coordinate of the vector.\"\n }\n },\n \"required\": [\n \"x\",\n \"y\"\n ]\n },\n {\n \"type\": \"object\",\n \"description\": \"Position of a comment relative to the frame to which it is attached.\",\n \"properties\": {\n \"node_id\": {\n \"type\": \"string\",\n \"description\": \"Unique id specifying the frame.\"\n },\n \"node_offset\": {\n \"type\": \"object\",\n \"description\": \"A 2d vector.\",\n \"properties\": {\n \"x\": {\n \"type\": \"number\",\n \"description\": \"X coordinate of the vector.\"\n },\n \"y\": {\n \"type\": \"number\",\n \"description\": \"Y coordinate of the vector.\"\n }\n },\n \"required\": [\n \"x\",\n \"y\"\n ]\n }\n },\n \"required\": [\n \"node_id\",\n \"node_offset\"\n ]\n },\n {\n \"type\": \"object\",\n \"description\": \"Position of a region comment on the canvas.\",\n \"properties\": {\n \"x\": {\n \"type\": \"number\",\n \"description\": \"X coordinate of the position.\"\n },\n \"y\": {\n \"type\": \"number\",\n \"description\": \"Y coordinate of the position.\"\n },\n \"region_height\": {\n \"type\": \"number\",\n \"description\": \"The height of the comment region. Must be greater than 0.\"\n },\n \"region_width\": {\n \"type\": \"number\",\n \"description\": \"The width of the comment region. Must be greater than 0.\"\n },\n \"comment_pin_corner\": {\n \"type\": \"string\",\n \"description\": \"The corner of the comment region to pin to the node's corner as a string enum.\",\n \"enum\": [\n \"top-left\",\n \"top-right\",\n \"bottom-left\",\n \"bottom-right\"\n ],\n \"default\": \"bottom-right\"\n }\n },\n \"required\": [\n \"x\",\n \"y\",\n \"region_height\",\n \"region_width\"\n ]\n },\n {\n \"type\": \"object\",\n \"description\": \"Position of a region comment relative to the frame to which it is attached.\",\n \"properties\": {\n \"node_id\": {\n \"type\": \"string\",\n \"description\": \"Unique id specifying the frame.\"\n },\n \"node_offset\": {\n \"type\": \"object\",\n \"description\": \"A 2d vector.\",\n \"properties\": {\n \"x\": {\n \"type\": \"number\",\n \"description\": \"X coordinate of the vector.\"\n },\n \"y\": {\n \"type\": \"number\",\n \"description\": \"Y coordinate of the vector.\"\n }\n },\n \"required\": [\n \"x\",\n \"y\"\n ]\n },\n \"region_height\": {\n \"type\": \"number\",\n \"description\": \"The height of the comment region. Must be greater than 0.\"\n },\n \"region_width\": {\n \"type\": \"number\",\n \"description\": \"The width of the comment region. Must be greater than 0.\"\n },\n \"comment_pin_corner\": {\n \"type\": \"string\",\n \"description\": \"The corner of the comment region to pin to the node's corner as a string enum.\",\n \"enum\": [\n \"top-left\",\n \"top-right\",\n \"bottom-left\",\n \"bottom-right\"\n ],\n \"default\": \"bottom-right\"\n }\n },\n \"required\": [\n \"node_id\",\n \"node_offset\",\n \"region_height\",\n \"region_width\"\n ]\n }\n ]\n }\n },\n \"required\": [\n \"message\"\n ]\n }\n }\n }\n}", + "use_request_body_schema_mode": true, + "validate_request_body_schema": true + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/AddFigmaCommentReaction.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/AddFigmaCommentReaction.json new file mode 100644 index 00000000..a7b9ad1f --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/AddFigmaCommentReaction.json @@ -0,0 +1,195 @@ +{ + "name": "AddFigmaCommentReaction", + "fully_qualified_name": "FigmaApi.AddFigmaCommentReaction@0.1.0", + "description": "Add a reaction to a comment on a Figma file.\n\nUse this tool to post a new reaction to an existing comment on a Figma file. It should be called when you want to react to a specific comment in a Figma project.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "file_or_branch_key", + "required": true, + "description": "Key of the file or branch where the comment reaction should be posted. Can be obtained via the Figma API.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to post comment reactions to. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "comment_id", + "required": true, + "description": "The unique identifier of the comment you want to react to in a Figma file.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of comment to react to." + }, + "inferrable": true, + "http_endpoint_parameter_name": "comment_id" + }, + { + "name": "reaction_emoji", + "required": true, + "description": "The emoji type of reaction as shortcode (e.g. `:heart:`, `:+1::skin-tone-2:`).", + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": { + "emoji": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The emoji type of reaction as shortcode (e.g. `:heart:`, `:+1::skin-tone-2:`). The list of accepted emoji shortcodes can be found in [this file](https://raw.githubusercontent.com/missive/emoji-mart/main/packages/emoji-mart-data/sets/14/native.json) under the top-level emojis and aliases fields, with optional skin tone modifiers when applicable." + } + }, + "inner_properties": null, + "description": "Reaction to post." + }, + "inferrable": true, + "http_endpoint_parameter_name": "requestBody" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'postCommentReaction'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_comments:write" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/comments/{comment_id}/reactions", + "http_method": "POST", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "file_key", + "tool_parameter_name": "file_or_branch_key", + "description": "File to post comment reactions to. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to post comment reactions to. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "comment_id", + "tool_parameter_name": "comment_id", + "description": "ID of comment to react to.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of comment to react to." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "requestBody", + "tool_parameter_name": "reaction_emoji", + "description": "Reaction to post.", + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": { + "emoji": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The emoji type of reaction as shortcode (e.g. `:heart:`, `:+1::skin-tone-2:`). The list of accepted emoji shortcodes can be found in [this file](https://raw.githubusercontent.com/missive/emoji-mart/main/packages/emoji-mart-data/sets/14/native.json) under the top-level emojis and aliases fields, with optional skin tone modifiers when applicable." + } + }, + "inner_properties": null, + "description": "Reaction to post." + }, + "accepted_as": "body", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": "{\n \"description\": \"Reaction to post.\",\n \"required\": true,\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"emoji\": {\n \"type\": \"string\",\n \"description\": \"The emoji type of reaction as shortcode (e.g. `:heart:`, `:+1::skin-tone-2:`). The list of accepted emoji shortcodes can be found in [this file](https://raw.githubusercontent.com/missive/emoji-mart/main/packages/emoji-mart-data/sets/14/native.json) under the top-level emojis and aliases fields, with optional skin tone modifiers when applicable.\"\n }\n },\n \"required\": [\n \"emoji\"\n ]\n }\n }\n }\n}", + "use_request_body_schema_mode": true, + "validate_request_body_schema": true + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/BulkUpdateFigmaDevResources.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/BulkUpdateFigmaDevResources.json new file mode 100644 index 00000000..f04462c8 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/BulkUpdateFigmaDevResources.json @@ -0,0 +1,179 @@ +{ + "name": "BulkUpdateFigmaDevResources", + "fully_qualified_name": "FigmaApi.BulkUpdateFigmaDevResources@0.1.0", + "description": "Update multiple Figma dev resources in bulk.\n\nThis tool updates developer resources across multiple Figma files. It should be called when you need to apply changes to several resources at once. The response will include arrays indicating which resources were successfully updated and which encountered errors.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "dev_resources_to_update", + "required": true, + "description": "A JSON list of dev resources to update. Each resource should include its unique identifier, name, and URL.", + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": { + "dev_resources": { + "val_type": "array", + "inner_val_type": "json", + "enum": null, + "properties": null, + "inner_properties": { + "id": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Unique identifier of the dev resource" + }, + "name": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The name of the dev resource." + }, + "url": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The URL of the dev resource." + } + }, + "description": "An array of dev resources." + } + }, + "inner_properties": null, + "description": "A list of dev resources that you want to update." + }, + "inferrable": true, + "http_endpoint_parameter_name": "requestBody" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'putDevResources'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_dev_resources:write" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/dev_resources", + "http_method": "PUT", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "requestBody", + "tool_parameter_name": "dev_resources_to_update", + "description": "A list of dev resources that you want to update.", + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": { + "dev_resources": { + "val_type": "array", + "inner_val_type": "json", + "enum": null, + "properties": null, + "inner_properties": { + "id": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Unique identifier of the dev resource" + }, + "name": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The name of the dev resource." + }, + "url": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The URL of the dev resource." + } + }, + "description": "An array of dev resources." + } + }, + "inner_properties": null, + "description": "A list of dev resources that you want to update." + }, + "accepted_as": "body", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": "{\n \"description\": \"A list of dev resources that you want to update.\",\n \"required\": true,\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"dev_resources\": {\n \"type\": \"array\",\n \"description\": \"An array of dev resources.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Unique identifier of the dev resource\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of the dev resource.\"\n },\n \"url\": {\n \"type\": \"string\",\n \"description\": \"The URL of the dev resource.\"\n }\n },\n \"required\": [\n \"id\"\n ]\n }\n }\n },\n \"required\": [\n \"dev_resources\"\n ]\n }\n }\n }\n}", + "use_request_body_schema_mode": true, + "validate_request_body_schema": true + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/CreateBulkDevResources.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/CreateBulkDevResources.json new file mode 100644 index 00000000..05a3691b --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/CreateBulkDevResources.json @@ -0,0 +1,195 @@ +{ + "name": "CreateBulkDevResources", + "fully_qualified_name": "FigmaApi.CreateBulkDevResources@0.1.0", + "description": "Bulk create developer resources in multiple Figma files.\n\nUse this tool to create multiple developer resources across different Figma files. Successfully created resources will be listed in the response, while any errors will also be provided, indicating issues such as non-existent file keys or duplicate URLs.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "dev_resources_list", + "required": true, + "description": "A JSON array of dev resources to create, each with a name, URL, file key, and node ID.", + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": { + "dev_resources": { + "val_type": "array", + "inner_val_type": "json", + "enum": null, + "properties": null, + "inner_properties": { + "name": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The name of the dev resource." + }, + "url": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The URL of the dev resource." + }, + "file_key": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The file key where the dev resource belongs." + }, + "node_id": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The target node to attach the dev resource to." + } + }, + "description": "An array of dev resources." + } + }, + "inner_properties": null, + "description": "A list of dev resources that you want to create." + }, + "inferrable": true, + "http_endpoint_parameter_name": "requestBody" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'postDevResources'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_dev_resources:write" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/dev_resources", + "http_method": "POST", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "requestBody", + "tool_parameter_name": "dev_resources_list", + "description": "A list of dev resources that you want to create.", + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": { + "dev_resources": { + "val_type": "array", + "inner_val_type": "json", + "enum": null, + "properties": null, + "inner_properties": { + "name": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The name of the dev resource." + }, + "url": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The URL of the dev resource." + }, + "file_key": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The file key where the dev resource belongs." + }, + "node_id": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The target node to attach the dev resource to." + } + }, + "description": "An array of dev resources." + } + }, + "inner_properties": null, + "description": "A list of dev resources that you want to create." + }, + "accepted_as": "body", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": "{\n \"description\": \"A list of dev resources that you want to create.\",\n \"required\": true,\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"dev_resources\": {\n \"type\": \"array\",\n \"description\": \"An array of dev resources.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of the dev resource.\"\n },\n \"url\": {\n \"type\": \"string\",\n \"description\": \"The URL of the dev resource.\"\n },\n \"file_key\": {\n \"type\": \"string\",\n \"description\": \"The file key where the dev resource belongs.\"\n },\n \"node_id\": {\n \"type\": \"string\",\n \"description\": \"The target node to attach the dev resource to.\"\n }\n },\n \"required\": [\n \"name\",\n \"url\",\n \"file_key\",\n \"node_id\"\n ]\n }\n }\n },\n \"required\": [\n \"dev_resources\"\n ]\n }\n }\n }\n}", + "use_request_body_schema_mode": true, + "validate_request_body_schema": true + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/CreateFigmaWebhook.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/CreateFigmaWebhook.json new file mode 100644 index 00000000..3ba835ab --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/CreateFigmaWebhook.json @@ -0,0 +1,263 @@ +{ + "name": "CreateFigmaWebhook", + "fully_qualified_name": "FigmaApi.CreateFigmaWebhook@0.1.0", + "description": "Create a new webhook for Figma events.\n\nThis tool creates a webhook in Figma that triggers an event to a specified endpoint. It sends a PING event by default, unless set to PAUSED, and can be reactivated later.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "webhook_details", + "required": true, + "description": "JSON containing details for creating the webhook, including event type, endpoint, and context.", + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": { + "event_type": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "PING", + "FILE_UPDATE", + "FILE_VERSION_UPDATE", + "FILE_DELETE", + "LIBRARY_PUBLISH", + "FILE_COMMENT", + "DEV_MODE_STATUS_UPDATE" + ], + "properties": null, + "inner_properties": null, + "description": "An enum representing the possible events that a webhook can subscribe to" + }, + "team_id": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Team id to receive updates about. This is deprecated, use 'context' and 'context_id' instead." + }, + "context": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Context to create the webhook for. Must be \"team\", \"project\", or \"file\"." + }, + "context_id": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The id of the context you want to receive updates about." + }, + "endpoint": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The HTTP endpoint that will receive a POST request when the event triggers. Max length 2048 characters." + }, + "passcode": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "String that will be passed back to your webhook endpoint to verify that it is being called by Figma. Max length 100 characters." + }, + "status": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "ACTIVE", + "PAUSED" + ], + "properties": null, + "inner_properties": null, + "description": "An enum representing the possible statuses you can set a webhook to:\n- `ACTIVE`: The webhook is healthy and receive all events\n- `PAUSED`: The webhook is paused and will not receive any events" + }, + "description": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "User provided description or name for the webhook. Max length 150 characters." + } + }, + "inner_properties": null, + "description": "The webhook to create." + }, + "inferrable": true, + "http_endpoint_parameter_name": "requestBody" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'postWebhook'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "webhooks:write" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v2/webhooks", + "http_method": "POST", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "requestBody", + "tool_parameter_name": "webhook_details", + "description": "The webhook to create.", + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": { + "event_type": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "PING", + "FILE_UPDATE", + "FILE_VERSION_UPDATE", + "FILE_DELETE", + "LIBRARY_PUBLISH", + "FILE_COMMENT", + "DEV_MODE_STATUS_UPDATE" + ], + "properties": null, + "inner_properties": null, + "description": "An enum representing the possible events that a webhook can subscribe to" + }, + "team_id": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Team id to receive updates about. This is deprecated, use 'context' and 'context_id' instead." + }, + "context": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Context to create the webhook for. Must be \"team\", \"project\", or \"file\"." + }, + "context_id": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The id of the context you want to receive updates about." + }, + "endpoint": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The HTTP endpoint that will receive a POST request when the event triggers. Max length 2048 characters." + }, + "passcode": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "String that will be passed back to your webhook endpoint to verify that it is being called by Figma. Max length 100 characters." + }, + "status": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "ACTIVE", + "PAUSED" + ], + "properties": null, + "inner_properties": null, + "description": "An enum representing the possible statuses you can set a webhook to:\n- `ACTIVE`: The webhook is healthy and receive all events\n- `PAUSED`: The webhook is paused and will not receive any events" + }, + "description": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "User provided description or name for the webhook. Max length 150 characters." + } + }, + "inner_properties": null, + "description": "The webhook to create." + }, + "accepted_as": "body", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": "{\n \"description\": \"The webhook to create.\",\n \"required\": true,\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"event_type\": {\n \"type\": \"string\",\n \"description\": \"An enum representing the possible events that a webhook can subscribe to\",\n \"enum\": [\n \"PING\",\n \"FILE_UPDATE\",\n \"FILE_VERSION_UPDATE\",\n \"FILE_DELETE\",\n \"LIBRARY_PUBLISH\",\n \"FILE_COMMENT\",\n \"DEV_MODE_STATUS_UPDATE\"\n ]\n },\n \"team_id\": {\n \"type\": \"string\",\n \"description\": \"Team id to receive updates about. This is deprecated, use 'context' and 'context_id' instead.\",\n \"deprecated\": true\n },\n \"context\": {\n \"type\": \"string\",\n \"description\": \"Context to create the webhook for. Must be \\\"team\\\", \\\"project\\\", or \\\"file\\\".\"\n },\n \"context_id\": {\n \"type\": \"string\",\n \"description\": \"The id of the context you want to receive updates about.\"\n },\n \"endpoint\": {\n \"type\": \"string\",\n \"description\": \"The HTTP endpoint that will receive a POST request when the event triggers. Max length 2048 characters.\"\n },\n \"passcode\": {\n \"type\": \"string\",\n \"description\": \"String that will be passed back to your webhook endpoint to verify that it is being called by Figma. Max length 100 characters.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"description\": \"An enum representing the possible statuses you can set a webhook to:\\n- `ACTIVE`: The webhook is healthy and receive all events\\n- `PAUSED`: The webhook is paused and will not receive any events\",\n \"enum\": [\n \"ACTIVE\",\n \"PAUSED\"\n ]\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"User provided description or name for the webhook. Max length 150 characters.\"\n }\n },\n \"required\": [\n \"event_type\",\n \"endpoint\",\n \"passcode\",\n \"context\",\n \"context_id\"\n ]\n }\n }\n }\n}", + "use_request_body_schema_mode": true, + "validate_request_body_schema": true + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/DeleteDevResource.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/DeleteDevResource.json new file mode 100644 index 00000000..e9432458 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/DeleteDevResource.json @@ -0,0 +1,144 @@ +{ + "name": "DeleteDevResource", + "fully_qualified_name": "FigmaApi.DeleteDevResource@0.1.0", + "description": "Delete a dev resource from a Figma file.\n\nCall this tool to delete a specific developer resource from a Figma file using the file key and resource ID.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "target_file_key", + "required": true, + "description": "The main file key from which to delete the dev resource. Must not be a branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The file to delete the dev resource from. This must be a main file key, not a branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "dev_resource_id", + "required": true, + "description": "The ID of the developer resource to delete from the Figma file.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The id of the dev resource to delete." + }, + "inferrable": true, + "http_endpoint_parameter_name": "dev_resource_id" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'deleteDevResource'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_dev_resources:write" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/dev_resources/{dev_resource_id}", + "http_method": "DELETE", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "file_key", + "tool_parameter_name": "target_file_key", + "description": "The file to delete the dev resource from. This must be a main file key, not a branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The file to delete the dev resource from. This must be a main file key, not a branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "dev_resource_id", + "tool_parameter_name": "dev_resource_id", + "description": "The id of the dev resource to delete.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The id of the dev resource to delete." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/DeleteFigmaComment.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/DeleteFigmaComment.json new file mode 100644 index 00000000..208eb254 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/DeleteFigmaComment.json @@ -0,0 +1,144 @@ +{ + "name": "DeleteFigmaComment", + "fully_qualified_name": "FigmaApi.DeleteFigmaComment@0.1.0", + "description": "Delete your comment from a Figma file.\n\nUse this tool to delete a specific comment you made on a Figma file. Only the original commenter can delete their comments.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "figma_file_key", + "required": true, + "description": "The file or branch key from which to delete the comment. Use `GET /v1/files/:key` with `branch_data` to obtain the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to delete comment from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "comment_identifier", + "required": true, + "description": "The ID of the comment you wish to delete from the Figma file. Only the original commenter can perform this action.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Comment id of comment to delete" + }, + "inferrable": true, + "http_endpoint_parameter_name": "comment_id" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'deleteComment'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_comments:write" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/comments/{comment_id}", + "http_method": "DELETE", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "file_key", + "tool_parameter_name": "figma_file_key", + "description": "File to delete comment from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to delete comment from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "comment_id", + "tool_parameter_name": "comment_identifier", + "description": "Comment id of comment to delete", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Comment id of comment to delete" + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/DeleteFigmaWebhook.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/DeleteFigmaWebhook.json new file mode 100644 index 00000000..96205f66 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/DeleteFigmaWebhook.json @@ -0,0 +1,111 @@ +{ + "name": "DeleteFigmaWebhook", + "fully_qualified_name": "FigmaApi.DeleteFigmaWebhook@0.1.0", + "description": "Delete a specified webhook in Figma.\n\nUse this tool to delete a specified webhook in Figma. This action is irreversible and should be called when a webhook is no longer needed.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "webhook_id_to_delete", + "required": true, + "description": "The unique identifier of the webhook you wish to delete. This ID is required for the deletion operation.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of webhook to delete" + }, + "inferrable": true, + "http_endpoint_parameter_name": "webhook_id" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'deleteWebhook'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "webhooks:write" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v2/webhooks/{webhook_id}", + "http_method": "DELETE", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "webhook_id", + "tool_parameter_name": "webhook_id_to_delete", + "description": "ID of webhook to delete", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of webhook to delete" + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/DeleteMyCommentReaction.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/DeleteMyCommentReaction.json new file mode 100644 index 00000000..186570af --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/DeleteMyCommentReaction.json @@ -0,0 +1,177 @@ +{ + "name": "DeleteMyCommentReaction", + "fully_qualified_name": "FigmaApi.DeleteMyCommentReaction@0.1.0", + "description": "Deletes your specific comment reaction in Figma.\n\nThis tool allows users to delete a reaction they added to a comment in a Figma file. It can only be used if the reaction was made by the person attempting to delete it.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "reaction_emoji", + "required": true, + "description": "The emoji associated with the reaction to be deleted. Only the emoji used for the reaction you added can be deleted.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "" + }, + "inferrable": true, + "http_endpoint_parameter_name": "emoji" + }, + { + "name": "file_or_branch_key", + "required": true, + "description": "Key of the Figma file or branch where the reaction should be deleted. Use `GET /v1/files/:key` with the `branch_data` query param to obtain the branch key if needed.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to delete comment reaction from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "comment_id", + "required": true, + "description": "The ID of the comment from which you want to delete your reaction.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of comment to delete reaction from." + }, + "inferrable": true, + "http_endpoint_parameter_name": "comment_id" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'deleteCommentReaction'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_comments:write" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/comments/{comment_id}/reactions", + "http_method": "DELETE", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "emoji", + "tool_parameter_name": "reaction_emoji", + "description": "", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "" + }, + "accepted_as": "query", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "file_key", + "tool_parameter_name": "file_or_branch_key", + "description": "File to delete comment reaction from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to delete comment reaction from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "comment_id", + "tool_parameter_name": "comment_id", + "description": "ID of comment to delete reaction from.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of comment to delete reaction from." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchCommentReactions.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchCommentReactions.json new file mode 100644 index 00000000..24e54d2c --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchCommentReactions.json @@ -0,0 +1,177 @@ +{ + "name": "FetchCommentReactions", + "fully_qualified_name": "FigmaApi.FetchCommentReactions@0.1.0", + "description": "Retrieve reactions from a specific comment in Figma.\n\nUse this tool to obtain a list of reactions left on a specific comment in a Figma file. This can help track engagement or feedback on comments.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "file_or_branch_key", + "required": true, + "description": "The key for the file or branch to retrieve the comment reactions from in Figma.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to get comment containing reactions from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "comment_id", + "required": true, + "description": "ID of the comment from which to retrieve reactions.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of comment to get reactions from." + }, + "inferrable": true, + "http_endpoint_parameter_name": "comment_id" + }, + { + "name": "pagination_cursor", + "required": false, + "description": "Cursor for pagination. Use the cursor from the previous call's response to retrieve the next set of reactions.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor for pagination, retrieved from the response of the previous call." + }, + "inferrable": true, + "http_endpoint_parameter_name": "cursor" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getCommentReactions'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_comments:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/comments/{comment_id}/reactions", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "cursor", + "tool_parameter_name": "pagination_cursor", + "description": "Cursor for pagination, retrieved from the response of the previous call.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor for pagination, retrieved from the response of the previous call." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "file_key", + "tool_parameter_name": "file_or_branch_key", + "description": "File to get comment containing reactions from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to get comment containing reactions from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "comment_id", + "tool_parameter_name": "comment_id", + "description": "ID of comment to get reactions from.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of comment to get reactions from." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchComponentUsageData.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchComponentUsageData.json new file mode 100644 index 00000000..de1076b5 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchComponentUsageData.json @@ -0,0 +1,183 @@ +{ + "name": "FetchComponentUsageData", + "fully_qualified_name": "FigmaApi.FetchComponentUsageData@0.1.0", + "description": "Fetch library analytics component usage data by dimension.\n\nThis tool retrieves a list of library analytics component usage data, providing insights into how components are used, broken down by the specified dimension.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "group_by_dimension", + "required": true, + "description": "A dimension to group the returned analytics data. Choose between 'component' or 'file'.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "component", + "file" + ], + "properties": null, + "inner_properties": null, + "description": "A dimension to group returned analytics data by." + }, + "inferrable": true, + "http_endpoint_parameter_name": "group_by" + }, + { + "name": "library_file_key", + "required": true, + "description": "The file key of the library to fetch analytics data for. Required for specifying the target library.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File key of the library to fetch analytics data for." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "data_page_cursor", + "required": false, + "description": "Cursor indicating which page of data to fetch, obtained from a prior API call.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call." + }, + "inferrable": true, + "http_endpoint_parameter_name": "cursor" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getLibraryAnalyticsComponentUsages'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "library_analytics:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/analytics/libraries/{file_key}/component/usages", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "cursor", + "tool_parameter_name": "data_page_cursor", + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "group_by", + "tool_parameter_name": "group_by_dimension", + "description": "A dimension to group returned analytics data by.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "component", + "file" + ], + "properties": null, + "inner_properties": null, + "description": "A dimension to group returned analytics data by." + }, + "accepted_as": "query", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "file_key", + "tool_parameter_name": "library_file_key", + "description": "File key of the library to fetch analytics data for.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File key of the library to fetch analytics data for." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchFigmaFile.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchFigmaFile.json new file mode 100644 index 00000000..55d125fc --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchFigmaFile.json @@ -0,0 +1,309 @@ +{ + "name": "FetchFigmaFile", + "fully_qualified_name": "FigmaApi.FetchFigmaFile@0.1.0", + "description": "Retrieve a Figma file as a JSON object using its file key.\n\nUse this tool to fetch a Figma document as JSON, identified by a file key. The returned data includes the document structure and metadata about components.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "file_key", + "required": true, + "description": "The unique key of the Figma file or branch to retrieve as JSON.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to export JSON from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "version_id", + "required": false, + "description": "Specify the version ID to retrieve a specific version of the file. Default is the current version.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A specific version ID to get. Omitting this will get the current version of the file." + }, + "inferrable": true, + "http_endpoint_parameter_name": "version" + }, + { + "name": "node_ids_of_interest", + "required": false, + "description": "Comma-separated list of node IDs to retrieve specific parts of the Figma document.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Comma separated list of nodes that you care about in the document. If specified, only a subset of the document will be returned corresponding to the nodes listed, their children, and everything between the root node and the listed nodes.\n\nNote: There may be other nodes included in the returned JSON that are outside the ancestor chains of the desired nodes. The response may also include dependencies of anything in the nodes' subtrees. For example, if a node subtree contains an instance of a local component that lives elsewhere in that file, that component and its ancestor chain will also be included.\n\nFor historical reasons, top-level canvas nodes are always returned, regardless of whether they are listed in the `ids` parameter. This quirk may be removed in a future version of the API." + }, + "inferrable": true, + "http_endpoint_parameter_name": "ids" + }, + { + "name": "traversal_depth", + "required": false, + "description": "Positive integer indicating the depth in the document tree to retrieve. For example, 1 returns only Pages; 2 returns Pages and top-level objects.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Positive integer representing how deep into the document tree to traverse. For example, setting this to 1 returns only Pages, setting it to 2 returns Pages and all top level objects on each page. Not setting this parameter returns all nodes." + }, + "inferrable": true, + "http_endpoint_parameter_name": "depth" + }, + { + "name": "export_vector_data", + "required": false, + "description": "Set to \"paths\" to include vector data in the response.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Set to \"paths\" to export vector data." + }, + "inferrable": true, + "http_endpoint_parameter_name": "geometry" + }, + { + "name": "include_plugin_data", + "required": false, + "description": "Comma separated list of plugin IDs and/or 'shared'. Includes plugin data in the result.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A comma separated list of plugin IDs and/or the string \"shared\". Any data present in the document written by those plugins will be included in the result in the `pluginData` and `sharedPluginData` properties." + }, + "inferrable": true, + "http_endpoint_parameter_name": "plugin_data" + }, + { + "name": "include_branch_metadata", + "required": false, + "description": "Set to true to include metadata about branches related to the file. If false, branch information will not be returned.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Returns branch metadata for the requested file. If the file is a branch, the main file's key will be included in the returned response. If the file has branches, their metadata will be included in the returned response. Default: false." + }, + "inferrable": true, + "http_endpoint_parameter_name": "branch_data" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getFile'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_content:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "version", + "tool_parameter_name": "version_id", + "description": "A specific version ID to get. Omitting this will get the current version of the file.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A specific version ID to get. Omitting this will get the current version of the file." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "ids", + "tool_parameter_name": "node_ids_of_interest", + "description": "Comma separated list of nodes that you care about in the document. If specified, only a subset of the document will be returned corresponding to the nodes listed, their children, and everything between the root node and the listed nodes.\n\nNote: There may be other nodes included in the returned JSON that are outside the ancestor chains of the desired nodes. The response may also include dependencies of anything in the nodes' subtrees. For example, if a node subtree contains an instance of a local component that lives elsewhere in that file, that component and its ancestor chain will also be included.\n\nFor historical reasons, top-level canvas nodes are always returned, regardless of whether they are listed in the `ids` parameter. This quirk may be removed in a future version of the API.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Comma separated list of nodes that you care about in the document. If specified, only a subset of the document will be returned corresponding to the nodes listed, their children, and everything between the root node and the listed nodes.\n\nNote: There may be other nodes included in the returned JSON that are outside the ancestor chains of the desired nodes. The response may also include dependencies of anything in the nodes' subtrees. For example, if a node subtree contains an instance of a local component that lives elsewhere in that file, that component and its ancestor chain will also be included.\n\nFor historical reasons, top-level canvas nodes are always returned, regardless of whether they are listed in the `ids` parameter. This quirk may be removed in a future version of the API." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "depth", + "tool_parameter_name": "traversal_depth", + "description": "Positive integer representing how deep into the document tree to traverse. For example, setting this to 1 returns only Pages, setting it to 2 returns Pages and all top level objects on each page. Not setting this parameter returns all nodes.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Positive integer representing how deep into the document tree to traverse. For example, setting this to 1 returns only Pages, setting it to 2 returns Pages and all top level objects on each page. Not setting this parameter returns all nodes." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "geometry", + "tool_parameter_name": "export_vector_data", + "description": "Set to \"paths\" to export vector data.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Set to \"paths\" to export vector data." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "plugin_data", + "tool_parameter_name": "include_plugin_data", + "description": "A comma separated list of plugin IDs and/or the string \"shared\". Any data present in the document written by those plugins will be included in the result in the `pluginData` and `sharedPluginData` properties.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A comma separated list of plugin IDs and/or the string \"shared\". Any data present in the document written by those plugins will be included in the result in the `pluginData` and `sharedPluginData` properties." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "branch_data", + "tool_parameter_name": "include_branch_metadata", + "description": "Returns branch metadata for the requested file. If the file is a branch, the main file's key will be included in the returned response. If the file has branches, their metadata will be included in the returned response. Default: false.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Returns branch metadata for the requested file. If the file is a branch, the main file's key will be included in the returned response. If the file has branches, their metadata will be included in the returned response. Default: false." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": false, + "documentation_urls": [] + }, + { + "name": "file_key", + "tool_parameter_name": "file_key", + "description": "File to export JSON from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to export JSON from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchFileVersionHistory.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchFileVersionHistory.json new file mode 100644 index 00000000..f0fcaa87 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchFileVersionHistory.json @@ -0,0 +1,210 @@ +{ + "name": "FetchFileVersionHistory", + "fully_qualified_name": "FigmaApi.FetchFileVersionHistory@0.1.0", + "description": "Fetch the version history of a Figma file.\n\nUse this tool to obtain the version history of a specific Figma file, enabling the analysis of its changes over time. This can be useful for reviewing past edits or rendering specific versions.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "target_file_key", + "required": true, + "description": "The key of the file or branch to fetch version history for. Use this to specify the Figma file whose version history you need.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to get version history from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "number_of_items_per_page", + "required": false, + "description": "Specify the number of items to return per page. Defaults to 30 if not provided.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The number of items returned in a page of the response. If not included, `page_size` is `30`." + }, + "inferrable": true, + "http_endpoint_parameter_name": "page_size" + }, + { + "name": "get_versions_before_id", + "required": false, + "description": "A version ID to get versions before it in the history. Used for pagination.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A version ID for one of the versions in the history. Gets versions before this ID. Used for paginating. If the response is not paginated, this link returns the same data in the current response." + }, + "inferrable": true, + "http_endpoint_parameter_name": "before" + }, + { + "name": "after_version_id", + "required": false, + "description": "Version ID to fetch subsequent versions. Used for pagination. Omit if not paginating.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A version ID for one of the versions in the history. Gets versions after this ID. Used for paginating. If the response is not paginated, this property is not included." + }, + "inferrable": true, + "http_endpoint_parameter_name": "after" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getFileVersions'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_versions:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/versions", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "page_size", + "tool_parameter_name": "number_of_items_per_page", + "description": "The number of items returned in a page of the response. If not included, `page_size` is `30`.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The number of items returned in a page of the response. If not included, `page_size` is `30`." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "before", + "tool_parameter_name": "get_versions_before_id", + "description": "A version ID for one of the versions in the history. Gets versions before this ID. Used for paginating. If the response is not paginated, this link returns the same data in the current response.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A version ID for one of the versions in the history. Gets versions before this ID. Used for paginating. If the response is not paginated, this link returns the same data in the current response." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "after", + "tool_parameter_name": "after_version_id", + "description": "A version ID for one of the versions in the history. Gets versions after this ID. Used for paginating. If the response is not paginated, this property is not included.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A version ID for one of the versions in the history. Gets versions after this ID. Used for paginating. If the response is not paginated, this property is not included." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "file_key", + "tool_parameter_name": "target_file_key", + "description": "File to get version history from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to get version history from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchImageFillLinks.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchImageFillLinks.json new file mode 100644 index 00000000..c2f6cf33 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchImageFillLinks.json @@ -0,0 +1,111 @@ +{ + "name": "FetchImageFillLinks", + "fully_qualified_name": "FigmaApi.FetchImageFillLinks@0.1.0", + "description": "Retrieve download links for images in a Figma document.\n\nUse this tool to get download links for all images present in the image fills of a Figma document. These links allow access to images users have added to their design files. The URLs will expire after about 14 days and can be found using image references.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "file_or_branch_key", + "required": true, + "description": "The file or branch key from which to retrieve image URLs. Use `GET /v1/files/:key` to get the branch key if needed.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to get image URLs from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getImageFills'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_content:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/images", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "file_key", + "tool_parameter_name": "file_or_branch_key", + "description": "File to get image URLs from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to get image URLs from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchLibraryAnalyticsVariableActions.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchLibraryAnalyticsVariableActions.json new file mode 100644 index 00000000..98fd62f8 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/FetchLibraryAnalyticsVariableActions.json @@ -0,0 +1,249 @@ +{ + "name": "FetchLibraryAnalyticsVariableActions", + "fully_qualified_name": "FigmaApi.FetchLibraryAnalyticsVariableActions@0.1.0", + "description": "Retrieve library analytics variable actions data from Figma.\n\nCall this tool to obtain a breakdown of library analytics variable actions data from Figma based on a specific dimension.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "group_by_dimension", + "required": true, + "description": "A dimension to group the returned analytics data by. Options: 'variable', 'team'.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "variable", + "team" + ], + "properties": null, + "inner_properties": null, + "description": "A dimension to group returned analytics data by." + }, + "inferrable": true, + "http_endpoint_parameter_name": "group_by" + }, + { + "name": "library_file_key", + "required": true, + "description": "The file key of the library for which to fetch analytics data.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File key of the library to fetch analytics data for." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "page_cursor", + "required": false, + "description": "Cursor to indicate which page of data to fetch, obtained from a previous API call.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call." + }, + "inferrable": true, + "http_endpoint_parameter_name": "cursor" + }, + { + "name": "earliest_week_start_date", + "required": false, + "description": "ISO 8601 date string (YYYY-MM-DD) representing the earliest week to include. Rounded back to the nearest week's start. Defaults to one year prior.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ISO 8601 date string (YYYY-MM-DD) of the earliest week to include. Dates are rounded back to the nearest start of a week. Defaults to one year prior." + }, + "inferrable": true, + "http_endpoint_parameter_name": "start_date" + }, + { + "name": "end_date", + "required": false, + "description": "ISO 8601 date string (YYYY-MM-DD) for the latest week to include. Defaults to the latest computed week.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ISO 8601 date string (YYYY-MM-DD) of the latest week to include. Dates are rounded forward to the nearest end of a week. Defaults to the latest computed week." + }, + "inferrable": true, + "http_endpoint_parameter_name": "end_date" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getLibraryAnalyticsVariableActions'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "library_analytics:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/analytics/libraries/{file_key}/variable/actions", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "cursor", + "tool_parameter_name": "page_cursor", + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "group_by", + "tool_parameter_name": "group_by_dimension", + "description": "A dimension to group returned analytics data by.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "variable", + "team" + ], + "properties": null, + "inner_properties": null, + "description": "A dimension to group returned analytics data by." + }, + "accepted_as": "query", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "start_date", + "tool_parameter_name": "earliest_week_start_date", + "description": "ISO 8601 date string (YYYY-MM-DD) of the earliest week to include. Dates are rounded back to the nearest start of a week. Defaults to one year prior.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ISO 8601 date string (YYYY-MM-DD) of the earliest week to include. Dates are rounded back to the nearest start of a week. Defaults to one year prior." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "end_date", + "tool_parameter_name": "end_date", + "description": "ISO 8601 date string (YYYY-MM-DD) of the latest week to include. Dates are rounded forward to the nearest end of a week. Defaults to the latest computed week.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ISO 8601 date string (YYYY-MM-DD) of the latest week to include. Dates are rounded forward to the nearest end of a week. Defaults to the latest computed week." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "file_key", + "tool_parameter_name": "library_file_key", + "description": "File key of the library to fetch analytics data for.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File key of the library to fetch analytics data for." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/FigmaGetTeamProjects.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/FigmaGetTeamProjects.json new file mode 100644 index 00000000..95459ef2 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/FigmaGetTeamProjects.json @@ -0,0 +1,111 @@ +{ + "name": "FigmaGetTeamProjects", + "fully_qualified_name": "FigmaApi.FigmaGetTeamProjects@0.1.0", + "description": "Fetch all projects within a specified Figma team.\n\nThis tool retrieves a list of projects for a specified team in Figma, visible to the authenticated user.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "team_id", + "required": true, + "description": "The unique ID of the Figma team to list projects from. This is required to specify which team's projects to retrieve.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of the team to list projects from" + }, + "inferrable": true, + "http_endpoint_parameter_name": "team_id" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getTeamProjects'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "projects:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/teams/{team_id}/projects", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "team_id", + "tool_parameter_name": "team_id", + "description": "ID of the team to list projects from", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of the team to list projects from" + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetDevResources.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetDevResources.json new file mode 100644 index 00000000..164b41e3 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetDevResources.json @@ -0,0 +1,144 @@ +{ + "name": "GetDevResources", + "fully_qualified_name": "FigmaApi.GetDevResources@0.1.0", + "description": "Retrieve development resources from a Figma file.\n\nUse this tool to gather development resources from a specific Figma file using the file key.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "file_key", + "required": true, + "description": "The main file key for fetching development resources from a Figma file. Ensure it is not a branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The file to get the dev resources from. This must be a main file key, not a branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "target_node_ids", + "required": false, + "description": "Comma separated list of node IDs to filter dev resources. If left blank, returns resources for all nodes.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Comma separated list of nodes that you care about in the document. If specified, only dev resources attached to these nodes will be returned. If not specified, all dev resources in the file will be returned." + }, + "inferrable": true, + "http_endpoint_parameter_name": "node_ids" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getDevResources'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_dev_resources:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/dev_resources", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "node_ids", + "tool_parameter_name": "target_node_ids", + "description": "Comma separated list of nodes that you care about in the document. If specified, only dev resources attached to these nodes will be returned. If not specified, all dev resources in the file will be returned.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Comma separated list of nodes that you care about in the document. If specified, only dev resources attached to these nodes will be returned. If not specified, all dev resources in the file will be returned." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "file_key", + "tool_parameter_name": "file_key", + "description": "The file to get the dev resources from. This must be a main file key, not a branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The file to get the dev resources from. This must be a main file key, not a branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaComponentMetadata.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaComponentMetadata.json new file mode 100644 index 00000000..e567d448 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaComponentMetadata.json @@ -0,0 +1,111 @@ +{ + "name": "GetFigmaComponentMetadata", + "fully_qualified_name": "FigmaApi.GetFigmaComponentMetadata@0.1.0", + "description": "Retrieve metadata for a Figma component by key.\n\nUse this tool to obtain detailed metadata about a specific Figma component using its key.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "component_key", + "required": true, + "description": "The unique identifier of the Figma component to retrieve metadata for.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The unique identifier of the component." + }, + "inferrable": true, + "http_endpoint_parameter_name": "key" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getComponent'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "library_assets:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/components/{key}", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "key", + "tool_parameter_name": "component_key", + "description": "The unique identifier of the component.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The unique identifier of the component." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaComponentSet.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaComponentSet.json new file mode 100644 index 00000000..e49207b1 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaComponentSet.json @@ -0,0 +1,111 @@ +{ + "name": "GetFigmaComponentSet", + "fully_qualified_name": "FigmaApi.GetFigmaComponentSet@0.1.0", + "description": "Retrieve metadata for a Figma component set using its key.\n\nUse this tool to obtain detailed metadata about a published component set in Figma by providing its unique key identifier.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "component_set_key", + "required": true, + "description": "The unique key identifier for the Figma component set to retrieve metadata.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The unique identifier of the component set." + }, + "inferrable": true, + "http_endpoint_parameter_name": "key" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getComponentSet'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "library_assets:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/component_sets/{key}", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "key", + "tool_parameter_name": "component_set_key", + "description": "The unique identifier of the component set.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The unique identifier of the component set." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaFileComments.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaFileComments.json new file mode 100644 index 00000000..7bcc916c --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaFileComments.json @@ -0,0 +1,144 @@ +{ + "name": "GetFigmaFileComments", + "fully_qualified_name": "FigmaApi.GetFigmaFileComments@0.1.0", + "description": "Retrieve comments from a Figma file.\n\nUse this tool to get a list of comments left on a specific Figma file. It is useful for accessing feedback or discussions related to file elements.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "figma_file_or_branch_key", + "required": true, + "description": "Specify the file or branch key to retrieve comments from. Use the `GET /v1/files/:key` endpoint with `branch_data` query param for branch keys.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to get comments from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "return_comments_as_markdown", + "required": false, + "description": "Set to true to return comments as markdown equivalents when applicable.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "If enabled, will return comments as their markdown equivalents when applicable." + }, + "inferrable": true, + "http_endpoint_parameter_name": "as_md" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getComments'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_comments:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/comments", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "as_md", + "tool_parameter_name": "return_comments_as_markdown", + "description": "If enabled, will return comments as their markdown equivalents when applicable.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "If enabled, will return comments as their markdown equivalents when applicable." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "file_key", + "tool_parameter_name": "figma_file_or_branch_key", + "description": "File to get comments from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to get comments from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaFileComponents.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaFileComponents.json new file mode 100644 index 00000000..72156476 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaFileComponents.json @@ -0,0 +1,111 @@ +{ + "name": "GetFigmaFileComponents", + "fully_qualified_name": "FigmaApi.GetFigmaFileComponents@0.1.0", + "description": "Retrieve published components from a Figma file library.\n\nUse this tool to obtain a list of all published components within a specific Figma file, allowing for design asset management or analysis.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "file_key", + "required": true, + "description": "Main file key to list components from. Must not be a branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to list components from. This must be a main file key, not a branch key, as it is not possible to publish from branches." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getFileComponents'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "library_content:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/components", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "file_key", + "tool_parameter_name": "file_key", + "description": "File to list components from. This must be a main file key, not a branch key, as it is not possible to publish from branches.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to list components from. This must be a main file key, not a branch key, as it is not possible to publish from branches." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaFileNodes.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaFileNodes.json new file mode 100644 index 00000000..29a224ed --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaFileNodes.json @@ -0,0 +1,276 @@ +{ + "name": "GetFigmaFileNodes", + "fully_qualified_name": "FigmaApi.GetFigmaFileNodes@0.1.0", + "description": "Retrieve nodes and metadata from a Figma file.\n\nUse this tool to get detailed information about specific nodes in a Figma file, including metadata like name, last modified date, thumbnail URL, editor type, version, and link access permissions. Also retrieves document structure, component mappings, and styles. Useful for accessing and analyzing Figma design elements.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "node_ids_to_retrieve", + "required": true, + "description": "A comma-separated list of Figma node IDs to retrieve as JSON.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A comma separated list of node IDs to retrieve and convert." + }, + "inferrable": true, + "http_endpoint_parameter_name": "ids" + }, + { + "name": "figma_file_key", + "required": true, + "description": "The file or branch key from which to export JSON data in Figma.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to export JSON from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "specific_version_id", + "required": false, + "description": "Specify a version ID to retrieve a particular version of the Figma file. If omitted, the current version is retrieved.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A specific version ID to get. Omitting this will get the current version of the file." + }, + "inferrable": true, + "http_endpoint_parameter_name": "version" + }, + { + "name": "node_tree_depth", + "required": false, + "description": "Positive integer indicating how deep into the node tree to traverse from the starting node. A value of 1 returns only immediate children. Leaving it unset returns all nodes.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Positive integer representing how deep into the node tree to traverse. For example, setting this to 1 will return only the children directly underneath the desired nodes. Not setting this parameter returns all nodes.\n\nNote: this parameter behaves differently from the same parameter in the `GET /v1/files/:key` endpoint. In this endpoint, the depth will be counted starting from the desired node rather than the document root node." + }, + "inferrable": true, + "http_endpoint_parameter_name": "depth" + }, + { + "name": "export_vector_data", + "required": false, + "description": "Set to \"paths\" to include vector data in the response.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Set to \"paths\" to export vector data." + }, + "inferrable": true, + "http_endpoint_parameter_name": "geometry" + }, + { + "name": "include_plugin_data", + "required": false, + "description": "Comma-separated plugin IDs and/or 'shared' to include plugin-related data in results.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A comma separated list of plugin IDs and/or the string \"shared\". Any data present in the document written by those plugins will be included in the result in the `pluginData` and `sharedPluginData` properties." + }, + "inferrable": true, + "http_endpoint_parameter_name": "plugin_data" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getFileNodes'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_content:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/nodes", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "ids", + "tool_parameter_name": "node_ids_to_retrieve", + "description": "A comma separated list of node IDs to retrieve and convert.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A comma separated list of node IDs to retrieve and convert." + }, + "accepted_as": "query", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "version", + "tool_parameter_name": "specific_version_id", + "description": "A specific version ID to get. Omitting this will get the current version of the file.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A specific version ID to get. Omitting this will get the current version of the file." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "depth", + "tool_parameter_name": "node_tree_depth", + "description": "Positive integer representing how deep into the node tree to traverse. For example, setting this to 1 will return only the children directly underneath the desired nodes. Not setting this parameter returns all nodes.\n\nNote: this parameter behaves differently from the same parameter in the `GET /v1/files/:key` endpoint. In this endpoint, the depth will be counted starting from the desired node rather than the document root node.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Positive integer representing how deep into the node tree to traverse. For example, setting this to 1 will return only the children directly underneath the desired nodes. Not setting this parameter returns all nodes.\n\nNote: this parameter behaves differently from the same parameter in the `GET /v1/files/:key` endpoint. In this endpoint, the depth will be counted starting from the desired node rather than the document root node." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "geometry", + "tool_parameter_name": "export_vector_data", + "description": "Set to \"paths\" to export vector data.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Set to \"paths\" to export vector data." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "plugin_data", + "tool_parameter_name": "include_plugin_data", + "description": "A comma separated list of plugin IDs and/or the string \"shared\". Any data present in the document written by those plugins will be included in the result in the `pluginData` and `sharedPluginData` properties.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A comma separated list of plugin IDs and/or the string \"shared\". Any data present in the document written by those plugins will be included in the result in the `pluginData` and `sharedPluginData` properties." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "file_key", + "tool_parameter_name": "figma_file_key", + "description": "File to export JSON from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to export JSON from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaProjectFiles.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaProjectFiles.json new file mode 100644 index 00000000..2e49e658 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaProjectFiles.json @@ -0,0 +1,144 @@ +{ + "name": "GetFigmaProjectFiles", + "fully_qualified_name": "FigmaApi.GetFigmaProjectFiles@0.1.0", + "description": "Retrieve all files from a specific Figma project.\n\nThis tool fetches a list of all files within the specified Figma project. Use it when you need to access or manage project files stored in Figma.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "project_identifier", + "required": true, + "description": "The unique string ID of the Figma project from which to list files.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of the project to list files from" + }, + "inferrable": true, + "http_endpoint_parameter_name": "project_id" + }, + { + "name": "include_branch_metadata", + "required": false, + "description": "Include branch metadata for each main file with a branch in the project. Set to true to receive this data, otherwise false.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Returns branch metadata in the response for each main file with a branch inside the project." + }, + "inferrable": true, + "http_endpoint_parameter_name": "branch_data" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getProjectFiles'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "projects:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/projects/{project_id}/files", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "branch_data", + "tool_parameter_name": "include_branch_metadata", + "description": "Returns branch metadata in the response for each main file with a branch inside the project.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Returns branch metadata in the response for each main file with a branch inside the project." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": false, + "documentation_urls": [] + }, + { + "name": "project_id", + "tool_parameter_name": "project_identifier", + "description": "ID of the project to list files from", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of the project to list files from" + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaWebhook.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaWebhook.json new file mode 100644 index 00000000..19df9655 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaWebhook.json @@ -0,0 +1,111 @@ +{ + "name": "GetFigmaWebhook", + "fully_qualified_name": "FigmaApi.GetFigmaWebhook@0.1.0", + "description": "Retrieve a Figma webhook by its ID.\n\nUse this tool to obtain detailed information about a specific Figma webhook by providing its unique ID.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "webhook_id", + "required": true, + "description": "Unique identifier of the Figma webhook to retrieve.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of webhook to get" + }, + "inferrable": true, + "http_endpoint_parameter_name": "webhook_id" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getWebhook'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "webhooks:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v2/webhooks/{webhook_id}", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "webhook_id", + "tool_parameter_name": "webhook_id", + "description": "ID of webhook to get", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of webhook to get" + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaWebhooks.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaWebhooks.json new file mode 100644 index 00000000..d7454da6 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFigmaWebhooks.json @@ -0,0 +1,210 @@ +{ + "name": "GetFigmaWebhooks", + "fully_qualified_name": "FigmaApi.GetFigmaWebhooks@0.1.0", + "description": "Retrieve a list of webhooks from Figma.\n\nCall this tool to get a list of webhooks available in your Figma context or plan. This can be used to manage and view all the webhooks you have access to, with results provided in a paginated format.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "webhook_context", + "required": false, + "description": "Specify the context for the webhooks. Accepts 'team', 'project', or 'file'.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Context to create the resource on. Should be \"team\", \"project\", or \"file\"." + }, + "inferrable": true, + "http_endpoint_parameter_name": "context" + }, + { + "name": "context_identifier", + "required": false, + "description": "The ID of the context to fetch attached webhooks. Cannot be used with plan_api_id.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The id of the context that you want to get attached webhooks for. If you're using context_id, you cannot use plan_api_id." + }, + "inferrable": true, + "http_endpoint_parameter_name": "context_id" + }, + { + "name": "plan_id_for_webhooks", + "required": false, + "description": "The ID of your plan for retrieving webhooks across all accessible contexts. Cannot be used with context or context_id.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The id of your plan. Use this to get all webhooks for all contexts you have access to. If you're using plan_api_id, you cannot use context or context_id. When you use plan_api_id, the response is paginated." + }, + "inferrable": true, + "http_endpoint_parameter_name": "plan_api_id" + }, + { + "name": "pagination_cursor", + "required": false, + "description": "Cursor for pagination when using plan_api_id. Provide next_page or prev_page from previous response to navigate pages.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "If you're using plan_api_id, this is the cursor to use for pagination. If you're using context or context_id, this parameter is ignored. Provide the next_page or prev_page value from the previous response to get the next or previous page of results." + }, + "inferrable": true, + "http_endpoint_parameter_name": "cursor" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getWebhooks'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "webhooks:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v2/webhooks", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "context", + "tool_parameter_name": "webhook_context", + "description": "Context to create the resource on. Should be \"team\", \"project\", or \"file\".", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Context to create the resource on. Should be \"team\", \"project\", or \"file\"." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "context_id", + "tool_parameter_name": "context_identifier", + "description": "The id of the context that you want to get attached webhooks for. If you're using context_id, you cannot use plan_api_id.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The id of the context that you want to get attached webhooks for. If you're using context_id, you cannot use plan_api_id." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "plan_api_id", + "tool_parameter_name": "plan_id_for_webhooks", + "description": "The id of your plan. Use this to get all webhooks for all contexts you have access to. If you're using plan_api_id, you cannot use context or context_id. When you use plan_api_id, the response is paginated.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The id of your plan. Use this to get all webhooks for all contexts you have access to. If you're using plan_api_id, you cannot use context or context_id. When you use plan_api_id, the response is paginated." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "cursor", + "tool_parameter_name": "pagination_cursor", + "description": "If you're using plan_api_id, this is the cursor to use for pagination. If you're using context or context_id, this parameter is ignored. Provide the next_page or prev_page value from the previous response to get the next or previous page of results.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "If you're using plan_api_id, this is the cursor to use for pagination. If you're using context or context_id, this parameter is ignored. Provide the next_page or prev_page value from the previous response to get the next or previous page of results." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFileMetadata.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFileMetadata.json new file mode 100644 index 00000000..8b4a1371 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetFileMetadata.json @@ -0,0 +1,111 @@ +{ + "name": "GetFileMetadata", + "fully_qualified_name": "FigmaApi.GetFileMetadata@0.1.0", + "description": "Retrieve metadata for a specified Figma file.\n\nThis tool is used to obtain metadata information from a specific Figma file by providing the file key. It can be called when users need to access details about a Figma file, such as its name, creator, and other properties.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "file_identifier", + "required": true, + "description": "File or branch key to get metadata for. Use the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to get metadata for. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getFileMeta'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_metadata:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/meta", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "file_key", + "tool_parameter_name": "file_identifier", + "description": "File to get metadata for. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to get metadata for. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetLibraryAnalyticsComponentActions.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetLibraryAnalyticsComponentActions.json new file mode 100644 index 00000000..10551437 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetLibraryAnalyticsComponentActions.json @@ -0,0 +1,249 @@ +{ + "name": "GetLibraryAnalyticsComponentActions", + "fully_qualified_name": "FigmaApi.GetLibraryAnalyticsComponentActions@0.1.0", + "description": "Get analytics for library component actions.\n\nRetrieve detailed data on library component actions in Figma, broken down by the specified dimension. This tool is used to gain insights into how components in a Figma library are being utilized.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "group_by_dimension", + "required": true, + "description": "Specify the dimension to group the analytics data by. Options are 'component' or 'team'.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "component", + "team" + ], + "properties": null, + "inner_properties": null, + "description": "A dimension to group returned analytics data by." + }, + "inferrable": true, + "http_endpoint_parameter_name": "group_by" + }, + { + "name": "library_file_key", + "required": true, + "description": "The unique file key for the Figma library to retrieve analytics data from.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File key of the library to fetch analytics data for." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "data_page_cursor", + "required": false, + "description": "Cursor indicating the specific page of data to fetch, obtained from a previous API call.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call." + }, + "inferrable": true, + "http_endpoint_parameter_name": "cursor" + }, + { + "name": "earliest_start_date", + "required": false, + "description": "ISO 8601 date string (YYYY-MM-DD) for the earliest week to include. Rounded back to the start of a week. Defaults to one year prior.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ISO 8601 date string (YYYY-MM-DD) of the earliest week to include. Dates are rounded back to the nearest start of a week. Defaults to one year prior." + }, + "inferrable": true, + "http_endpoint_parameter_name": "start_date" + }, + { + "name": "latest_inclusion_date", + "required": false, + "description": "ISO 8601 date string (YYYY-MM-DD) of the latest week to include, rounded forward to the nearest week's end. Defaults to the latest computed week.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ISO 8601 date string (YYYY-MM-DD) of the latest week to include. Dates are rounded forward to the nearest end of a week. Defaults to the latest computed week." + }, + "inferrable": true, + "http_endpoint_parameter_name": "end_date" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getLibraryAnalyticsComponentActions'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "library_analytics:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/analytics/libraries/{file_key}/component/actions", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "cursor", + "tool_parameter_name": "data_page_cursor", + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "group_by", + "tool_parameter_name": "group_by_dimension", + "description": "A dimension to group returned analytics data by.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "component", + "team" + ], + "properties": null, + "inner_properties": null, + "description": "A dimension to group returned analytics data by." + }, + "accepted_as": "query", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "start_date", + "tool_parameter_name": "earliest_start_date", + "description": "ISO 8601 date string (YYYY-MM-DD) of the earliest week to include. Dates are rounded back to the nearest start of a week. Defaults to one year prior.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ISO 8601 date string (YYYY-MM-DD) of the earliest week to include. Dates are rounded back to the nearest start of a week. Defaults to one year prior." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "end_date", + "tool_parameter_name": "latest_inclusion_date", + "description": "ISO 8601 date string (YYYY-MM-DD) of the latest week to include. Dates are rounded forward to the nearest end of a week. Defaults to the latest computed week.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ISO 8601 date string (YYYY-MM-DD) of the latest week to include. Dates are rounded forward to the nearest end of a week. Defaults to the latest computed week." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "file_key", + "tool_parameter_name": "library_file_key", + "description": "File key of the library to fetch analytics data for.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File key of the library to fetch analytics data for." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetLibraryAnalyticsVariableUsages.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetLibraryAnalyticsVariableUsages.json new file mode 100644 index 00000000..b78a0655 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetLibraryAnalyticsVariableUsages.json @@ -0,0 +1,183 @@ +{ + "name": "GetLibraryAnalyticsVariableUsages", + "fully_qualified_name": "FigmaApi.GetLibraryAnalyticsVariableUsages@0.1.0", + "description": "Retrieve analytics on library variable usage.\n\nFetches a breakdown of library analytics variable usage data by the specified dimension.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "group_by_dimension", + "required": true, + "description": "Specifies the dimension ('variable' or 'file') for grouping library analytics data.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "variable", + "file" + ], + "properties": null, + "inner_properties": null, + "description": "A dimension to group returned analytics data by." + }, + "inferrable": true, + "http_endpoint_parameter_name": "group_by" + }, + { + "name": "library_file_key", + "required": true, + "description": "The unique key of the library to fetch analytics data from.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File key of the library to fetch analytics data for." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "page_cursor", + "required": false, + "description": "A token to fetch the specific page of results, received from a previous API call.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call." + }, + "inferrable": true, + "http_endpoint_parameter_name": "cursor" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getLibraryAnalyticsVariableUsages'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "library_analytics:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/analytics/libraries/{file_key}/variable/usages", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "cursor", + "tool_parameter_name": "page_cursor", + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "group_by", + "tool_parameter_name": "group_by_dimension", + "description": "A dimension to group returned analytics data by.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "variable", + "file" + ], + "properties": null, + "inner_properties": null, + "description": "A dimension to group returned analytics data by." + }, + "accepted_as": "query", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "file_key", + "tool_parameter_name": "library_file_key", + "description": "File key of the library to fetch analytics data for.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File key of the library to fetch analytics data for." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetLibraryStyleActions.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetLibraryStyleActions.json new file mode 100644 index 00000000..1e3d587a --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetLibraryStyleActions.json @@ -0,0 +1,249 @@ +{ + "name": "GetLibraryStyleActions", + "fully_qualified_name": "FigmaApi.GetLibraryStyleActions@0.1.0", + "description": "Retrieve library style analytics actions data by dimension.\n\nUse this tool to obtain detailed actions data for styles in a Figma library, categorized by the specified dimension. Ideal for analyzing how styles are used or modified.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "group_by_dimension", + "required": true, + "description": "Specify the dimension ('style' or 'team') to group the returned analytics data by.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "style", + "team" + ], + "properties": null, + "inner_properties": null, + "description": "A dimension to group returned analytics data by." + }, + "inferrable": true, + "http_endpoint_parameter_name": "group_by" + }, + { + "name": "library_file_key", + "required": true, + "description": "The unique file key of the Figma library to retrieve analytics data for.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File key of the library to fetch analytics data for." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "pagination_cursor", + "required": false, + "description": "A cursor to indicate which page of data to fetch. Obtain this from a prior API call.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call." + }, + "inferrable": true, + "http_endpoint_parameter_name": "cursor" + }, + { + "name": "earliest_week_start_date", + "required": false, + "description": "ISO 8601 date string (YYYY-MM-DD) for the earliest week to include. Dates round back to the nearest week start. Defaults to one year prior.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ISO 8601 date string (YYYY-MM-DD) of the earliest week to include. Dates are rounded back to the nearest start of a week. Defaults to one year prior." + }, + "inferrable": true, + "http_endpoint_parameter_name": "start_date" + }, + { + "name": "end_date", + "required": false, + "description": "ISO 8601 date string (YYYY-MM-DD) for the latest week to include, rounded to the week's end. Defaults to the latest computed week if not specified.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ISO 8601 date string (YYYY-MM-DD) of the latest week to include. Dates are rounded forward to the nearest end of a week. Defaults to the latest computed week." + }, + "inferrable": true, + "http_endpoint_parameter_name": "end_date" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getLibraryAnalyticsStyleActions'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "library_analytics:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/analytics/libraries/{file_key}/style/actions", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "cursor", + "tool_parameter_name": "pagination_cursor", + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "group_by", + "tool_parameter_name": "group_by_dimension", + "description": "A dimension to group returned analytics data by.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "style", + "team" + ], + "properties": null, + "inner_properties": null, + "description": "A dimension to group returned analytics data by." + }, + "accepted_as": "query", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "start_date", + "tool_parameter_name": "earliest_week_start_date", + "description": "ISO 8601 date string (YYYY-MM-DD) of the earliest week to include. Dates are rounded back to the nearest start of a week. Defaults to one year prior.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ISO 8601 date string (YYYY-MM-DD) of the earliest week to include. Dates are rounded back to the nearest start of a week. Defaults to one year prior." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "end_date", + "tool_parameter_name": "end_date", + "description": "ISO 8601 date string (YYYY-MM-DD) of the latest week to include. Dates are rounded forward to the nearest end of a week. Defaults to the latest computed week.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ISO 8601 date string (YYYY-MM-DD) of the latest week to include. Dates are rounded forward to the nearest end of a week. Defaults to the latest computed week." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "file_key", + "tool_parameter_name": "library_file_key", + "description": "File key of the library to fetch analytics data for.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File key of the library to fetch analytics data for." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetLibraryStyleUsageData.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetLibraryStyleUsageData.json new file mode 100644 index 00000000..238789e1 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetLibraryStyleUsageData.json @@ -0,0 +1,183 @@ +{ + "name": "GetLibraryStyleUsageData", + "fully_qualified_name": "FigmaApi.GetLibraryStyleUsageData@0.1.0", + "description": "Retrieve style usage data from Figma library analytics.\n\nThis tool returns library analytics style usage data from Figma, broken down by the requested dimension. It should be used to analyze style usage within a specific Figma library file.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "group_by_dimension", + "required": true, + "description": "Dimension to group the returned analytics data by. Options are 'style' or 'file'.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "style", + "file" + ], + "properties": null, + "inner_properties": null, + "description": "A dimension to group returned analytics data by." + }, + "inferrable": true, + "http_endpoint_parameter_name": "group_by" + }, + { + "name": "library_file_key", + "required": true, + "description": "The file key of the Figma library to fetch analytics data for. This is required to specify the source library.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File key of the library to fetch analytics data for." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "pagination_cursor", + "required": false, + "description": "Cursor indicating which page of data to fetch, obtained from a previous API call.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call." + }, + "inferrable": true, + "http_endpoint_parameter_name": "cursor" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getLibraryAnalyticsStyleUsages'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "library_analytics:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/analytics/libraries/{file_key}/style/usages", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "cursor", + "tool_parameter_name": "pagination_cursor", + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating what page of data to fetch. Obtained from prior API call." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "group_by", + "tool_parameter_name": "group_by_dimension", + "description": "A dimension to group returned analytics data by.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "style", + "file" + ], + "properties": null, + "inner_properties": null, + "description": "A dimension to group returned analytics data by." + }, + "accepted_as": "query", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "file_key", + "tool_parameter_name": "library_file_key", + "description": "File key of the library to fetch analytics data for.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File key of the library to fetch analytics data for." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetPublishedComponentSets.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetPublishedComponentSets.json new file mode 100644 index 00000000..81cea0ed --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetPublishedComponentSets.json @@ -0,0 +1,111 @@ +{ + "name": "GetPublishedComponentSets", + "fully_qualified_name": "FigmaApi.GetPublishedComponentSets@0.1.0", + "description": "Retrieve published component sets from a Figma file.\n\nCall this tool to get a list of published component sets within a specified Figma file library. Useful for accessing design components efficiently.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "main_file_key", + "required": true, + "description": "The main file key of the Figma file to list component sets from. Must not be a branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to list component sets from. This must be a main file key, not a branch key, as it is not possible to publish from branches." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getFileComponentSets'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "library_content:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/component_sets", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "file_key", + "tool_parameter_name": "main_file_key", + "description": "File to list component sets from. This must be a main file key, not a branch key, as it is not possible to publish from branches.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to list component sets from. This must be a main file key, not a branch key, as it is not possible to publish from branches." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetPublishedStylesFromFile.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetPublishedStylesFromFile.json new file mode 100644 index 00000000..85347f43 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetPublishedStylesFromFile.json @@ -0,0 +1,111 @@ +{ + "name": "GetPublishedStylesFromFile", + "fully_qualified_name": "FigmaApi.GetPublishedStylesFromFile@0.1.0", + "description": "Retrieve published styles from a Figma file library.\n\nUse this tool to get a list of published styles within a specific Figma file library. Useful when you need to analyze or display the styles used in a Figma file.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "main_file_key", + "required": true, + "description": "Main file key to list styles from. Must not be a branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to list styles from. This must be a main file key, not a branch key, as it is not possible to publish from branches." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getFileStyles'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "library_content:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/styles", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "file_key", + "tool_parameter_name": "main_file_key", + "description": "File to list styles from. This must be a main file key, not a branch key, as it is not possible to publish from branches.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to list styles from. This must be a main file key, not a branch key, as it is not possible to publish from branches." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetPublishedVariables.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetPublishedVariables.json new file mode 100644 index 00000000..9780794f --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetPublishedVariables.json @@ -0,0 +1,111 @@ +{ + "name": "GetPublishedVariables", + "fully_qualified_name": "FigmaApi.GetPublishedVariables@0.1.0", + "description": "Retrieve published variables from a Figma file.\n\nCall this tool to get a list of variables that are published from a specified Figma file. The response includes variable and collection details along with `subscribed_id`. Ideal for users needing information on published variables from a file within an Enterprise organization.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "main_file_key", + "required": true, + "description": "The key of the Figma file to retrieve published variables from. Only use the main file key, not a branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to get variables from. This must be a main file key, not a branch key, as it is not possible to publish from branches." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getPublishedVariables'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_variables:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/variables/published", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "file_key", + "tool_parameter_name": "main_file_key", + "description": "File to get variables from. This must be a main file key, not a branch key, as it is not possible to publish from branches.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to get variables from. This must be a main file key, not a branch key, as it is not possible to publish from branches." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetRecentWebhookRequests.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetRecentWebhookRequests.json new file mode 100644 index 00000000..c142ab90 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetRecentWebhookRequests.json @@ -0,0 +1,111 @@ +{ + "name": "GetRecentWebhookRequests", + "fully_qualified_name": "FigmaApi.GetRecentWebhookRequests@0.1.0", + "description": "Retrieve recent webhook requests from the last week.\n\nUse this tool to gather webhook requests sent within the last week for debugging purposes.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "webhook_subscription_id", + "required": true, + "description": "The ID of the webhook subscription for which to retrieve recent events.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The id of the webhook subscription you want to see events from" + }, + "inferrable": true, + "http_endpoint_parameter_name": "webhook_id" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getWebhookRequests'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "webhooks:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v2/webhooks/{webhook_id}/requests", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "webhook_id", + "tool_parameter_name": "webhook_subscription_id", + "description": "The id of the webhook subscription you want to see events from", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The id of the webhook subscription you want to see events from" + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetStyleMetadata.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetStyleMetadata.json new file mode 100644 index 00000000..04c8aaae --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetStyleMetadata.json @@ -0,0 +1,111 @@ +{ + "name": "GetStyleMetadata", + "fully_qualified_name": "FigmaApi.GetStyleMetadata@0.1.0", + "description": "Retrieve Figma style metadata by key.\n\nUse this tool to get detailed metadata about a specific style in Figma using its unique key. Useful for accessing style information for design analysis or integration.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "style_key", + "required": true, + "description": "The unique identifier of the Figma style to retrieve metadata for.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The unique identifier of the style." + }, + "inferrable": true, + "http_endpoint_parameter_name": "key" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getStyle'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "library_assets:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/styles/{key}", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "key", + "tool_parameter_name": "style_key", + "description": "The unique identifier of the style.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The unique identifier of the style." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetTeamComponentSets.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetTeamComponentSets.json new file mode 100644 index 00000000..22279f26 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetTeamComponentSets.json @@ -0,0 +1,210 @@ +{ + "name": "GetTeamComponentSets", + "fully_qualified_name": "FigmaApi.GetTeamComponentSets@0.1.0", + "description": "Fetch published component sets from a Figma team library.\n\nThis tool retrieves a paginated list of component sets that have been published within a specified team library in Figma. It should be used when you need to access or explore available component sets in a particular Figma team.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "team_id", + "required": true, + "description": "The unique identifier for the team from which to list component sets.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Id of the team to list component sets from." + }, + "inferrable": true, + "http_endpoint_parameter_name": "team_id" + }, + { + "name": "number_of_items_per_page", + "required": false, + "description": "Specify the number of items to return per page in the results. Defaults to 30.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Number of items to return in a paged list of results. Defaults to 30." + }, + "inferrable": true, + "http_endpoint_parameter_name": "page_size" + }, + { + "name": "start_after_cursor", + "required": false, + "description": "Cursor indicating the starting point for retrieving component sets, exclusive with `end_before_cursor`. This cursor is an internally tracked integer not corresponding to any IDs.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating which id after which to start retrieving component sets for. Exclusive with before. The cursor value is an internally tracked integer that doesn't correspond to any Ids." + }, + "inferrable": true, + "http_endpoint_parameter_name": "after" + }, + { + "name": "cursor_before_id", + "required": false, + "description": "Cursor ID indicating the point before which to retrieve component sets. It must be exclusive with the 'after' cursor.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating which id before which to start retrieving component sets for. Exclusive with after. The cursor value is an internally tracked integer that doesn't correspond to any Ids." + }, + "inferrable": true, + "http_endpoint_parameter_name": "before" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getTeamComponentSets'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "team_library_content:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/teams/{team_id}/component_sets", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "page_size", + "tool_parameter_name": "number_of_items_per_page", + "description": "Number of items to return in a paged list of results. Defaults to 30.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Number of items to return in a paged list of results. Defaults to 30." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": 30, + "documentation_urls": [] + }, + { + "name": "after", + "tool_parameter_name": "start_after_cursor", + "description": "Cursor indicating which id after which to start retrieving component sets for. Exclusive with before. The cursor value is an internally tracked integer that doesn't correspond to any Ids.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating which id after which to start retrieving component sets for. Exclusive with before. The cursor value is an internally tracked integer that doesn't correspond to any Ids." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "before", + "tool_parameter_name": "cursor_before_id", + "description": "Cursor indicating which id before which to start retrieving component sets for. Exclusive with after. The cursor value is an internally tracked integer that doesn't correspond to any Ids.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating which id before which to start retrieving component sets for. Exclusive with after. The cursor value is an internally tracked integer that doesn't correspond to any Ids." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "team_id", + "tool_parameter_name": "team_id", + "description": "Id of the team to list component sets from.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Id of the team to list component sets from." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetTeamComponents.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetTeamComponents.json new file mode 100644 index 00000000..faaa88cb --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetTeamComponents.json @@ -0,0 +1,210 @@ +{ + "name": "GetTeamComponents", + "fully_qualified_name": "FigmaApi.GetTeamComponents@0.1.0", + "description": "Retrieve published components from a team's Figma library.\n\nUse this tool to get a list of components that have been published within a specified team's library in Figma.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "team_id", + "required": true, + "description": "The unique identifier of the team whose components you want to retrieve. This ID is necessary to specify the source team library in Figma.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Id of the team to list components from." + }, + "inferrable": true, + "http_endpoint_parameter_name": "team_id" + }, + { + "name": "number_of_items_per_page", + "required": false, + "description": "Specify the number of components to return in one page. Defaults to 30, maximum is 1000.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Number of items to return in a paged list of results. Defaults to 30. Maximum of 1000." + }, + "inferrable": true, + "http_endpoint_parameter_name": "page_size" + }, + { + "name": "cursor_after_id", + "required": false, + "description": "Cursor indicating which ID to start retrieving components after. Cannot be used with 'before'.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating which id after which to start retrieving components for. Exclusive with before. The cursor value is an internally tracked integer that doesn't correspond to any Ids." + }, + "inferrable": true, + "http_endpoint_parameter_name": "after" + }, + { + "name": "cursor_before", + "required": false, + "description": "Cursor to retrieve components starting before a specific id. Exclusive with 'cursor_after'.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating which id before which to start retrieving components for. Exclusive with after. The cursor value is an internally tracked integer that doesn't correspond to any Ids." + }, + "inferrable": true, + "http_endpoint_parameter_name": "before" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getTeamComponents'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "team_library_content:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/teams/{team_id}/components", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "page_size", + "tool_parameter_name": "number_of_items_per_page", + "description": "Number of items to return in a paged list of results. Defaults to 30. Maximum of 1000.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Number of items to return in a paged list of results. Defaults to 30. Maximum of 1000." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": 30, + "documentation_urls": [] + }, + { + "name": "after", + "tool_parameter_name": "cursor_after_id", + "description": "Cursor indicating which id after which to start retrieving components for. Exclusive with before. The cursor value is an internally tracked integer that doesn't correspond to any Ids.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating which id after which to start retrieving components for. Exclusive with before. The cursor value is an internally tracked integer that doesn't correspond to any Ids." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "before", + "tool_parameter_name": "cursor_before", + "description": "Cursor indicating which id before which to start retrieving components for. Exclusive with after. The cursor value is an internally tracked integer that doesn't correspond to any Ids.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating which id before which to start retrieving components for. Exclusive with after. The cursor value is an internally tracked integer that doesn't correspond to any Ids." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "team_id", + "tool_parameter_name": "team_id", + "description": "Id of the team to list components from.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Id of the team to list components from." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetTeamStyles.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetTeamStyles.json new file mode 100644 index 00000000..72e55f55 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetTeamStyles.json @@ -0,0 +1,210 @@ +{ + "name": "GetTeamStyles", + "fully_qualified_name": "FigmaApi.GetTeamStyles@0.1.0", + "description": "Retrieve a list of published styles from a team's library in Figma.\n\nThis tool retrieves a paginated list of styles that have been published within a specified team's library in Figma. It should be called when you need access to design styles, such as colors or text styles, that a team has made available in their library.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "team_id", + "required": true, + "description": "The unique identifier of the team from which to retrieve published styles.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Id of the team to list styles from." + }, + "inferrable": true, + "http_endpoint_parameter_name": "team_id" + }, + { + "name": "items_per_page", + "required": false, + "description": "Specify the number of styles to return per page. Defaults to 30 if not provided.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Number of items to return in a paged list of results. Defaults to 30." + }, + "inferrable": true, + "http_endpoint_parameter_name": "page_size" + }, + { + "name": "start_after_cursor", + "required": false, + "description": "Cursor to start retrieving styles after a specific ID. Cannot be used with before. Internally tracked integer.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating which id after which to start retrieving styles for. Exclusive with before. The cursor value is an internally tracked integer that doesn't correspond to any Ids." + }, + "inferrable": true, + "http_endpoint_parameter_name": "after" + }, + { + "name": "cursor_before_id", + "required": false, + "description": "Cursor for retrieving styles before a specific ID. Use this to paginate backwards. Exclusive with after.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating which id before which to start retrieving styles for. Exclusive with after. The cursor value is an internally tracked integer that doesn't correspond to any Ids." + }, + "inferrable": true, + "http_endpoint_parameter_name": "before" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getTeamStyles'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "team_library_content:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/teams/{team_id}/styles", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "page_size", + "tool_parameter_name": "items_per_page", + "description": "Number of items to return in a paged list of results. Defaults to 30.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Number of items to return in a paged list of results. Defaults to 30." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": 30, + "documentation_urls": [] + }, + { + "name": "after", + "tool_parameter_name": "start_after_cursor", + "description": "Cursor indicating which id after which to start retrieving styles for. Exclusive with before. The cursor value is an internally tracked integer that doesn't correspond to any Ids.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating which id after which to start retrieving styles for. Exclusive with before. The cursor value is an internally tracked integer that doesn't correspond to any Ids." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "before", + "tool_parameter_name": "cursor_before_id", + "description": "Cursor indicating which id before which to start retrieving styles for. Exclusive with after. The cursor value is an internally tracked integer that doesn't correspond to any Ids.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Cursor indicating which id before which to start retrieving styles for. Exclusive with after. The cursor value is an internally tracked integer that doesn't correspond to any Ids." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "team_id", + "tool_parameter_name": "team_id", + "description": "Id of the team to list styles from.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Id of the team to list styles from." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetUserInformation.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetUserInformation.json new file mode 100644 index 00000000..c7885e97 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/GetUserInformation.json @@ -0,0 +1,76 @@ +{ + "name": "GetUserInformation", + "fully_qualified_name": "FigmaApi.GetUserInformation@0.1.0", + "description": "Retrieve information for the authenticated Figma user.\n\nUse this tool to obtain the profile information of the user currently authenticated in the Figma service.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [] + }, + "output": { + "description": "Response from the API endpoint 'getMe'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "current_user:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/me", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/ManageFigmaVariables.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/ManageFigmaVariables.json new file mode 100644 index 00000000..e6d62208 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/ManageFigmaVariables.json @@ -0,0 +1,260 @@ +{ + "name": "ManageFigmaVariables", + "fully_qualified_name": "FigmaApi.ManageFigmaVariables@0.1.0", + "description": "Manage and organize Figma variable collections in bulk.\n\nThis tool allows you to create, update, and delete variable collections, modes, and variables within Figma files for Enterprise members with Editor seats. Use it to handle variable operations in bulk, including setting mode values and managing temporary IDs. Ideal for organizing complex Figma projects efficiently.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "file_identifier", + "required": true, + "description": "Specifies the Figma file or branch key to modify variables. Retrieve branch key using `GET /v1/files/:key` with `branch_data` parameter.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to modify variables in. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "variable_operations_request_body", + "required": true, + "description": "A JSON object detailing the operations to create, update, or delete variable collections, modes, or values. Includes arrays for variableCollections, variableModes, variables, and variableModeValues. Temporary IDs can be used for newly created objects and must be unique within the request. The request must be 4MB or less.", + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": { + "variableCollections": { + "val_type": "array", + "inner_val_type": "json", + "enum": null, + "properties": null, + "inner_properties": {}, + "description": "For creating, updating, and deleting variable collections." + }, + "variableModes": { + "val_type": "array", + "inner_val_type": "json", + "enum": null, + "properties": null, + "inner_properties": {}, + "description": "For creating, updating, and deleting modes within variable collections." + }, + "variables": { + "val_type": "array", + "inner_val_type": "json", + "enum": null, + "properties": null, + "inner_properties": {}, + "description": "For creating, updating, and deleting variables." + }, + "variableModeValues": { + "val_type": "array", + "inner_val_type": "json", + "enum": null, + "properties": null, + "inner_properties": { + "variableId": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The target variable. You can use the temporary id of a variable." + }, + "modeId": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Must correspond to a mode in the variable collection that contains the target variable." + }, + "value": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The value for the variable. The value must match the variable's type. If setting to a variable alias, the alias must resolve to this type." + } + }, + "description": "For setting a specific value, given a variable and a mode." + } + }, + "inner_properties": null, + "description": "" + }, + "inferrable": true, + "http_endpoint_parameter_name": "requestBody" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'postVariables'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_variables:write" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/variables", + "http_method": "POST", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "file_key", + "tool_parameter_name": "file_identifier", + "description": "File to modify variables in. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to modify variables in. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "requestBody", + "tool_parameter_name": "variable_operations_request_body", + "description": "", + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": { + "variableCollections": { + "val_type": "array", + "inner_val_type": "json", + "enum": null, + "properties": null, + "inner_properties": {}, + "description": "For creating, updating, and deleting variable collections." + }, + "variableModes": { + "val_type": "array", + "inner_val_type": "json", + "enum": null, + "properties": null, + "inner_properties": {}, + "description": "For creating, updating, and deleting modes within variable collections." + }, + "variables": { + "val_type": "array", + "inner_val_type": "json", + "enum": null, + "properties": null, + "inner_properties": {}, + "description": "For creating, updating, and deleting variables." + }, + "variableModeValues": { + "val_type": "array", + "inner_val_type": "json", + "enum": null, + "properties": null, + "inner_properties": { + "variableId": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The target variable. You can use the temporary id of a variable." + }, + "modeId": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Must correspond to a mode in the variable collection that contains the target variable." + }, + "value": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The value for the variable. The value must match the variable's type. If setting to a variable alias, the alias must resolve to this type." + } + }, + "description": "For setting a specific value, given a variable and a mode." + } + }, + "inner_properties": null, + "description": "" + }, + "accepted_as": "body", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": "{\n \"required\": true,\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"minProperties\": 1,\n \"properties\": {\n \"variableCollections\": {\n \"type\": \"array\",\n \"description\": \"For creating, updating, and deleting variable collections.\",\n \"items\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"description\": \"An object that contains details about creating a `VariableCollection`.\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"description\": \"The action to perform for the variable collection.\",\n \"enum\": [\n \"CREATE\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"A temporary id for this variable collection.\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of this variable collection.\"\n },\n \"initialModeId\": {\n \"type\": \"string\",\n \"description\": \"The initial mode refers to the mode that is created by default. You can set a temporary id here, in order to reference this mode later in this request.\"\n },\n \"hiddenFromPublishing\": {\n \"type\": \"boolean\",\n \"description\": \"Whether this variable collection is hidden when publishing the current file as a library.\",\n \"default\": false\n }\n },\n \"required\": [\n \"action\",\n \"name\"\n ]\n },\n {\n \"type\": \"object\",\n \"description\": \"An object that contains details about updating a `VariableCollection`.\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"description\": \"The action to perform for the variable collection.\",\n \"enum\": [\n \"UPDATE\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The id of the variable collection to update.\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of this variable collection.\"\n },\n \"hiddenFromPublishing\": {\n \"type\": \"boolean\",\n \"description\": \"Whether this variable collection is hidden when publishing the current file as a library.\",\n \"default\": false\n }\n },\n \"required\": [\n \"action\",\n \"id\"\n ]\n },\n {\n \"type\": \"object\",\n \"description\": \"An object that contains details about deleting a `VariableCollection`.\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"description\": \"The action to perform for the variable collection.\",\n \"enum\": [\n \"DELETE\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The id of the variable collection to delete.\"\n }\n },\n \"required\": [\n \"action\",\n \"id\"\n ]\n }\n ],\n \"discriminator\": {\n \"propertyName\": \"action\",\n \"mapping\": {\n \"CREATE\": \"#/components/schemas/VariableCollectionCreate\",\n \"UPDATE\": \"#/components/schemas/VariableCollectionUpdate\",\n \"DELETE\": \"#/components/schemas/VariableCollectionDelete\"\n }\n }\n }\n },\n \"variableModes\": {\n \"type\": \"array\",\n \"description\": \"For creating, updating, and deleting modes within variable collections.\",\n \"items\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"description\": \"An object that contains details about creating a `VariableMode`.\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"description\": \"The action to perform for the variable mode.\",\n \"enum\": [\n \"CREATE\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"A temporary id for this variable mode.\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of this variable mode.\"\n },\n \"variableCollectionId\": {\n \"type\": \"string\",\n \"description\": \"The variable collection that will contain the mode. You can use the temporary id of a variable collection.\"\n }\n },\n \"required\": [\n \"action\",\n \"name\",\n \"variableCollectionId\"\n ]\n },\n {\n \"type\": \"object\",\n \"description\": \"An object that contains details about updating a `VariableMode`.\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"description\": \"The action to perform for the variable mode.\",\n \"enum\": [\n \"UPDATE\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The id of the variable mode to update.\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of this variable mode.\"\n },\n \"variableCollectionId\": {\n \"type\": \"string\",\n \"description\": \"The variable collection that contains the mode.\"\n }\n },\n \"required\": [\n \"action\",\n \"id\",\n \"variableCollectionId\"\n ]\n },\n {\n \"type\": \"object\",\n \"description\": \"An object that contains details about deleting a `VariableMode`.\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"description\": \"The action to perform for the variable mode.\",\n \"enum\": [\n \"DELETE\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The id of the variable mode to delete.\"\n }\n },\n \"required\": [\n \"action\",\n \"id\"\n ]\n }\n ],\n \"discriminator\": {\n \"propertyName\": \"action\",\n \"mapping\": {\n \"CREATE\": \"#/components/schemas/VariableModeCreate\",\n \"UPDATE\": \"#/components/schemas/VariableModeUpdate\",\n \"DELETE\": \"#/components/schemas/VariableModeDelete\"\n }\n }\n }\n },\n \"variables\": {\n \"type\": \"array\",\n \"description\": \"For creating, updating, and deleting variables.\",\n \"items\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"description\": \"An object that contains details about creating a `Variable`.\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"description\": \"The action to perform for the variable.\",\n \"enum\": [\n \"CREATE\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"A temporary id for this variable.\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of this variable.\"\n },\n \"variableCollectionId\": {\n \"type\": \"string\",\n \"description\": \"The variable collection that will contain the variable. You can use the temporary id of a variable collection.\"\n },\n \"resolvedType\": {\n \"type\": \"string\",\n \"description\": \"Defines the types of data a VariableData object can eventually equal\",\n \"enum\": [\n \"BOOLEAN\",\n \"FLOAT\",\n \"STRING\",\n \"COLOR\"\n ]\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"The description of this variable.\"\n },\n \"hiddenFromPublishing\": {\n \"type\": \"boolean\",\n \"description\": \"Whether this variable is hidden when publishing the current file as a library.\",\n \"default\": false\n },\n \"scopes\": {\n \"type\": \"array\",\n \"description\": \"An array of scopes in the UI where this variable is shown. Setting this property will show/hide this variable in the variable picker UI for different fields.\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\n \"ALL_SCOPES\",\n \"TEXT_CONTENT\",\n \"CORNER_RADIUS\",\n \"WIDTH_HEIGHT\",\n \"GAP\",\n \"ALL_FILLS\",\n \"FRAME_FILL\",\n \"SHAPE_FILL\",\n \"TEXT_FILL\",\n \"STROKE_COLOR\",\n \"STROKE_FLOAT\",\n \"EFFECT_FLOAT\",\n \"EFFECT_COLOR\",\n \"OPACITY\",\n \"FONT_FAMILY\",\n \"FONT_STYLE\",\n \"FONT_WEIGHT\",\n \"FONT_SIZE\",\n \"LINE_HEIGHT\",\n \"LETTER_SPACING\",\n \"PARAGRAPH_SPACING\",\n \"PARAGRAPH_INDENT\",\n \"FONT_VARIATIONS\"\n ],\n \"description\": \"Scopes allow a variable to be shown or hidden in the variable picker for various fields. This declutters the Figma UI if you have a large number of variables. Variable scopes are currently supported on `FLOAT`, `STRING`, and `COLOR` variables.\\n\\n`ALL_SCOPES` is a special scope that means that the variable will be shown in the variable picker for all variable fields. If `ALL_SCOPES` is set, no additional scopes can be set.\\n\\n`ALL_FILLS` is a special scope that means that the variable will be shown in the variable picker for all fill fields. If `ALL_FILLS` is set, no additional fill scopes can be set.\\n\\nValid scopes for `FLOAT` variables:\\n- `ALL_SCOPES`\\n- `TEXT_CONTENT`\\n- `WIDTH_HEIGHT`\\n- `GAP`\\n- `STROKE_FLOAT`\\n- `EFFECT_FLOAT`\\n- `OPACITY`\\n- `FONT_WEIGHT`\\n- `FONT_SIZE`\\n- `LINE_HEIGHT`\\n- `LETTER_SPACING`\\n- `PARAGRAPH_SPACING`\\n- `PARAGRAPH_INDENT`\\n\\nValid scopes for `STRING` variables:\\n- `ALL_SCOPES`\\n- `TEXT_CONTENT`\\n- `FONT_FAMILY`\\n- `FONT_STYLE`\\n\\nValid scopes for `COLOR` variables:\\n- `ALL_SCOPES`\\n- `ALL_FILLS`\\n- `FRAME_FILL`\\n- `SHAPE_FILL`\\n- `TEXT_FILL`\\n- `STROKE_COLOR`\\n- `EFFECT_COLOR`\"\n }\n },\n \"codeSyntax\": {\n \"type\": \"object\",\n \"description\": \"An object containing platform-specific code syntax definitions for a variable. All platforms are optional.\",\n \"properties\": {\n \"WEB\": {\n \"type\": \"string\"\n },\n \"ANDROID\": {\n \"type\": \"string\"\n },\n \"iOS\": {\n \"type\": \"string\"\n }\n }\n }\n },\n \"required\": [\n \"action\",\n \"name\",\n \"variableCollectionId\",\n \"resolvedType\"\n ]\n },\n {\n \"type\": \"object\",\n \"description\": \"An object that contains details about updating a `Variable`.\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"description\": \"The action to perform for the variable.\",\n \"enum\": [\n \"UPDATE\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The id of the variable to update.\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of this variable.\"\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"The description of this variable.\"\n },\n \"hiddenFromPublishing\": {\n \"type\": \"boolean\",\n \"description\": \"Whether this variable is hidden when publishing the current file as a library.\",\n \"default\": false\n },\n \"scopes\": {\n \"type\": \"array\",\n \"description\": \"An array of scopes in the UI where this variable is shown. Setting this property will show/hide this variable in the variable picker UI for different fields.\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\n \"ALL_SCOPES\",\n \"TEXT_CONTENT\",\n \"CORNER_RADIUS\",\n \"WIDTH_HEIGHT\",\n \"GAP\",\n \"ALL_FILLS\",\n \"FRAME_FILL\",\n \"SHAPE_FILL\",\n \"TEXT_FILL\",\n \"STROKE_COLOR\",\n \"STROKE_FLOAT\",\n \"EFFECT_FLOAT\",\n \"EFFECT_COLOR\",\n \"OPACITY\",\n \"FONT_FAMILY\",\n \"FONT_STYLE\",\n \"FONT_WEIGHT\",\n \"FONT_SIZE\",\n \"LINE_HEIGHT\",\n \"LETTER_SPACING\",\n \"PARAGRAPH_SPACING\",\n \"PARAGRAPH_INDENT\",\n \"FONT_VARIATIONS\"\n ],\n \"description\": \"Scopes allow a variable to be shown or hidden in the variable picker for various fields. This declutters the Figma UI if you have a large number of variables. Variable scopes are currently supported on `FLOAT`, `STRING`, and `COLOR` variables.\\n\\n`ALL_SCOPES` is a special scope that means that the variable will be shown in the variable picker for all variable fields. If `ALL_SCOPES` is set, no additional scopes can be set.\\n\\n`ALL_FILLS` is a special scope that means that the variable will be shown in the variable picker for all fill fields. If `ALL_FILLS` is set, no additional fill scopes can be set.\\n\\nValid scopes for `FLOAT` variables:\\n- `ALL_SCOPES`\\n- `TEXT_CONTENT`\\n- `WIDTH_HEIGHT`\\n- `GAP`\\n- `STROKE_FLOAT`\\n- `EFFECT_FLOAT`\\n- `OPACITY`\\n- `FONT_WEIGHT`\\n- `FONT_SIZE`\\n- `LINE_HEIGHT`\\n- `LETTER_SPACING`\\n- `PARAGRAPH_SPACING`\\n- `PARAGRAPH_INDENT`\\n\\nValid scopes for `STRING` variables:\\n- `ALL_SCOPES`\\n- `TEXT_CONTENT`\\n- `FONT_FAMILY`\\n- `FONT_STYLE`\\n\\nValid scopes for `COLOR` variables:\\n- `ALL_SCOPES`\\n- `ALL_FILLS`\\n- `FRAME_FILL`\\n- `SHAPE_FILL`\\n- `TEXT_FILL`\\n- `STROKE_COLOR`\\n- `EFFECT_COLOR`\"\n }\n },\n \"codeSyntax\": {\n \"type\": \"object\",\n \"description\": \"An object containing platform-specific code syntax definitions for a variable. All platforms are optional.\",\n \"properties\": {\n \"WEB\": {\n \"type\": \"string\"\n },\n \"ANDROID\": {\n \"type\": \"string\"\n },\n \"iOS\": {\n \"type\": \"string\"\n }\n }\n }\n },\n \"required\": [\n \"action\",\n \"id\"\n ]\n },\n {\n \"type\": \"object\",\n \"description\": \"An object that contains details about deleting a `Variable`.\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"description\": \"The action to perform for the variable.\",\n \"enum\": [\n \"DELETE\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The id of the variable to delete.\"\n }\n },\n \"required\": [\n \"action\",\n \"id\"\n ]\n }\n ],\n \"discriminator\": {\n \"propertyName\": \"action\",\n \"mapping\": {\n \"CREATE\": \"#/components/schemas/VariableCreate\",\n \"UPDATE\": \"#/components/schemas/VariableUpdate\",\n \"DELETE\": \"#/components/schemas/VariableDelete\"\n }\n }\n }\n },\n \"variableModeValues\": {\n \"type\": \"array\",\n \"description\": \"For setting a specific value, given a variable and a mode.\",\n \"items\": {\n \"type\": \"object\",\n \"description\": \"An object that represents a value for a given mode of a variable. All properties are required.\",\n \"properties\": {\n \"variableId\": {\n \"type\": \"string\",\n \"description\": \"The target variable. You can use the temporary id of a variable.\"\n },\n \"modeId\": {\n \"type\": \"string\",\n \"description\": \"Must correspond to a mode in the variable collection that contains the target variable.\"\n },\n \"value\": {\n \"description\": \"The value for the variable. The value must match the variable's type. If setting to a variable alias, the alias must resolve to this type.\",\n \"oneOf\": [\n {\n \"type\": \"boolean\"\n },\n {\n \"type\": \"number\"\n },\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"object\",\n \"description\": \"An RGB color\",\n \"properties\": {\n \"r\": {\n \"type\": \"number\",\n \"description\": \"Red channel value, between 0 and 1.\",\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"g\": {\n \"type\": \"number\",\n \"description\": \"Green channel value, between 0 and 1.\",\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"b\": {\n \"type\": \"number\",\n \"description\": \"Blue channel value, between 0 and 1.\",\n \"minimum\": 0,\n \"maximum\": 1\n }\n },\n \"required\": [\n \"r\",\n \"g\",\n \"b\"\n ]\n },\n {\n \"type\": \"object\",\n \"description\": \"An RGBA color\",\n \"properties\": {\n \"r\": {\n \"type\": \"number\",\n \"description\": \"Red channel value, between 0 and 1.\",\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"g\": {\n \"type\": \"number\",\n \"description\": \"Green channel value, between 0 and 1.\",\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"b\": {\n \"type\": \"number\",\n \"description\": \"Blue channel value, between 0 and 1.\",\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"a\": {\n \"type\": \"number\",\n \"description\": \"Alpha channel value, between 0 and 1.\",\n \"minimum\": 0,\n \"maximum\": 1\n }\n },\n \"required\": [\n \"r\",\n \"g\",\n \"b\",\n \"a\"\n ]\n },\n {\n \"type\": \"object\",\n \"description\": \"Contains a variable alias\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\n \"VARIABLE_ALIAS\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The id of the variable that the current variable is aliased to. This variable can be a local or remote variable, and both can be retrieved via the GET /v1/files/:file_key/variables/local endpoint.\"\n }\n },\n \"required\": [\n \"type\",\n \"id\"\n ]\n }\n ]\n }\n },\n \"required\": [\n \"variableId\",\n \"modeId\",\n \"value\"\n ]\n }\n }\n }\n }\n }\n }\n}", + "use_request_body_schema_mode": true, + "validate_request_body_schema": true + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/RenderFigmaImages.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/RenderFigmaImages.json new file mode 100644 index 00000000..2a7aedb8 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/RenderFigmaImages.json @@ -0,0 +1,451 @@ +{ + "name": "RenderFigmaImages", + "fully_qualified_name": "FigmaApi.RenderFigmaImages@0.1.0", + "description": "Fetch rendered images from Figma files by node IDs.\n\nUse this tool to render and retrieve images from a Figma file by specifying node IDs. The tool returns a mapping of node IDs to URLs of the rendered images. Note: Some entries may be null if rendering fails for certain nodes. Images expire after 30 days.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "node_ids_to_render", + "required": true, + "description": "A comma-separated list of node IDs for images to be rendered.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A comma separated list of node IDs to render." + }, + "inferrable": true, + "http_endpoint_parameter_name": "ids" + }, + { + "name": "figma_file_key", + "required": true, + "description": "The key for the Figma file or branch to export images from. Use with the `branch_data` query parameter to obtain branch key if needed.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to export images from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + }, + { + "name": "version_id", + "required": false, + "description": "Specify a version ID to retrieve a particular version of a Figma file. If omitted, will use the current version.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A specific version ID to get. Omitting this will get the current version of the file." + }, + "inferrable": true, + "http_endpoint_parameter_name": "version" + }, + { + "name": "image_scale_factor", + "required": false, + "description": "A number between 0.01 and 4, representing the image scaling factor for rendering.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A number between 0.01 and 4, the image scaling factor." + }, + "inferrable": true, + "http_endpoint_parameter_name": "scale" + }, + { + "name": "image_output_format", + "required": false, + "description": "Specify the image format for the output. Options are 'jpg', 'png', 'svg', or 'pdf'.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "jpg", + "png", + "svg", + "pdf" + ], + "properties": null, + "inner_properties": null, + "description": "A string enum for the image output format." + }, + "inferrable": true, + "http_endpoint_parameter_name": "format" + }, + { + "name": "render_text_as_outlines", + "required": false, + "description": "Determines if text elements are rendered as outlines in SVGs. Set `true` for visual consistency; `false` for selectable text.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Whether text elements are rendered as outlines (vector paths) or as `` elements in SVGs.\n\nRendering text elements as outlines guarantees that the text looks exactly the same in the SVG as it does in the browser/inside Figma.\n\nExporting as `` allows text to be selectable inside SVGs and generally makes the SVG easier to read. However, this relies on the browser's rendering engine which can vary between browsers and/or operating systems. As such, visual accuracy is not guaranteed as the result could look different than in Figma." + }, + "inferrable": true, + "http_endpoint_parameter_name": "svg_outline_text" + }, + { + "name": "include_svg_id_attributes", + "required": false, + "description": "Include id attributes for all SVG elements. Adds the layer name to the 'id' attribute.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Whether to include id attributes for all SVG elements. Adds the layer name to the `id` attribute of an svg element." + }, + "inferrable": true, + "http_endpoint_parameter_name": "svg_include_id" + }, + { + "name": "include_node_id_in_svg_elements", + "required": false, + "description": "Set to true to include node ID attributes for all SVG elements, adding the node ID to a `data-node-id` attribute.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Whether to include node id attributes for all SVG elements. Adds the node id to a `data-node-id` attribute of an svg element." + }, + "inferrable": true, + "http_endpoint_parameter_name": "svg_include_node_id" + }, + { + "name": "svg_stroke_simplification_enabled", + "required": false, + "description": "Set to true to simplify inside/outside strokes in SVG using stroke attributes instead of ``.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Whether to simplify inside/outside strokes and use stroke attribute if possible instead of ``." + }, + "inferrable": true, + "http_endpoint_parameter_name": "svg_simplify_stroke" + }, + { + "name": "exclude_overlapping_content", + "required": false, + "description": "Set to true to exclude overlapping content from rendering. Set to false to include overlaps, which may increase processing time.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Whether content that overlaps the node should be excluded from rendering. Passing false (i.e., rendering overlaps) may increase processing time, since more of the document must be included in rendering." + }, + "inferrable": true, + "http_endpoint_parameter_name": "contents_only" + }, + { + "name": "use_full_dimensions_without_cropping", + "required": false, + "description": "Export using full node dimensions, ignoring cropping and empty space. Ensures text nodes are fully visible.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Use the full dimensions of the node regardless of whether or not it is cropped or the space around it is empty. Use this to export text nodes without cropping." + }, + "inferrable": true, + "http_endpoint_parameter_name": "use_absolute_bounds" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getImages'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_content:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/images/{file_key}", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "ids", + "tool_parameter_name": "node_ids_to_render", + "description": "A comma separated list of node IDs to render.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A comma separated list of node IDs to render." + }, + "accepted_as": "query", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "version", + "tool_parameter_name": "version_id", + "description": "A specific version ID to get. Omitting this will get the current version of the file.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A specific version ID to get. Omitting this will get the current version of the file." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "scale", + "tool_parameter_name": "image_scale_factor", + "description": "A number between 0.01 and 4, the image scaling factor.", + "value_schema": { + "val_type": "number", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "A number between 0.01 and 4, the image scaling factor." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "format", + "tool_parameter_name": "image_output_format", + "description": "A string enum for the image output format.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "jpg", + "png", + "svg", + "pdf" + ], + "properties": null, + "inner_properties": null, + "description": "A string enum for the image output format." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": "png", + "documentation_urls": [] + }, + { + "name": "svg_outline_text", + "tool_parameter_name": "render_text_as_outlines", + "description": "Whether text elements are rendered as outlines (vector paths) or as `` elements in SVGs.\n\nRendering text elements as outlines guarantees that the text looks exactly the same in the SVG as it does in the browser/inside Figma.\n\nExporting as `` allows text to be selectable inside SVGs and generally makes the SVG easier to read. However, this relies on the browser's rendering engine which can vary between browsers and/or operating systems. As such, visual accuracy is not guaranteed as the result could look different than in Figma.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Whether text elements are rendered as outlines (vector paths) or as `` elements in SVGs.\n\nRendering text elements as outlines guarantees that the text looks exactly the same in the SVG as it does in the browser/inside Figma.\n\nExporting as `` allows text to be selectable inside SVGs and generally makes the SVG easier to read. However, this relies on the browser's rendering engine which can vary between browsers and/or operating systems. As such, visual accuracy is not guaranteed as the result could look different than in Figma." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": true, + "documentation_urls": [] + }, + { + "name": "svg_include_id", + "tool_parameter_name": "include_svg_id_attributes", + "description": "Whether to include id attributes for all SVG elements. Adds the layer name to the `id` attribute of an svg element.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Whether to include id attributes for all SVG elements. Adds the layer name to the `id` attribute of an svg element." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": false, + "documentation_urls": [] + }, + { + "name": "svg_include_node_id", + "tool_parameter_name": "include_node_id_in_svg_elements", + "description": "Whether to include node id attributes for all SVG elements. Adds the node id to a `data-node-id` attribute of an svg element.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Whether to include node id attributes for all SVG elements. Adds the node id to a `data-node-id` attribute of an svg element." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": false, + "documentation_urls": [] + }, + { + "name": "svg_simplify_stroke", + "tool_parameter_name": "svg_stroke_simplification_enabled", + "description": "Whether to simplify inside/outside strokes and use stroke attribute if possible instead of ``.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Whether to simplify inside/outside strokes and use stroke attribute if possible instead of ``." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": true, + "documentation_urls": [] + }, + { + "name": "contents_only", + "tool_parameter_name": "exclude_overlapping_content", + "description": "Whether content that overlaps the node should be excluded from rendering. Passing false (i.e., rendering overlaps) may increase processing time, since more of the document must be included in rendering.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Whether content that overlaps the node should be excluded from rendering. Passing false (i.e., rendering overlaps) may increase processing time, since more of the document must be included in rendering." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": true, + "documentation_urls": [] + }, + { + "name": "use_absolute_bounds", + "tool_parameter_name": "use_full_dimensions_without_cropping", + "description": "Use the full dimensions of the node regardless of whether or not it is cropped or the space around it is empty. Use this to export text nodes without cropping.", + "value_schema": { + "val_type": "boolean", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "Use the full dimensions of the node regardless of whether or not it is cropped or the space around it is empty. Use this to export text nodes without cropping." + }, + "accepted_as": "query", + "required": false, + "deprecated": false, + "default": false, + "documentation_urls": [] + }, + { + "name": "file_key", + "tool_parameter_name": "figma_file_key", + "description": "File to export images from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to export images from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/RetrieveFigmaLocalVariables.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/RetrieveFigmaLocalVariables.json new file mode 100644 index 00000000..791ab602 --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/RetrieveFigmaLocalVariables.json @@ -0,0 +1,111 @@ +{ + "name": "RetrieveFigmaLocalVariables", + "fully_qualified_name": "FigmaApi.RetrieveFigmaLocalVariables@0.1.0", + "description": "Retrieve local and remote variables from a Figma file.\n\nUse this tool to get a list of local variables created in a Figma file and any remote variables utilized, identified by their `subscribed_id`. This tool is available to full members of Enterprise organizations. It's useful for examining mode values and understanding variable usage within a file.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "file_or_branch_key", + "required": true, + "description": "The key for the file or branch to retrieve variables from in Figma. If a branch, use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to get variables from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "inferrable": true, + "http_endpoint_parameter_name": "file_key" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'getLocalVariables'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "file_variables:read" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v1/files/{file_key}/variables/local", + "http_method": "GET", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "file_key", + "tool_parameter_name": "file_or_branch_key", + "description": "File to get variables from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "File to get variables from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key." + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": null, + "use_request_body_schema_mode": false, + "validate_request_body_schema": false + } +} diff --git a/toolkits/figma_api/arcade_figma_api/wrapper_tools/UpdateFigmaWebhook.json b/toolkits/figma_api/arcade_figma_api/wrapper_tools/UpdateFigmaWebhook.json new file mode 100644 index 00000000..f877997a --- /dev/null +++ b/toolkits/figma_api/arcade_figma_api/wrapper_tools/UpdateFigmaWebhook.json @@ -0,0 +1,248 @@ +{ + "name": "UpdateFigmaWebhook", + "fully_qualified_name": "FigmaApi.UpdateFigmaWebhook@0.1.0", + "description": "Update a Figma webhook by its ID.\n\nUse this tool to update the settings or parameters of an existing webhook in Figma by specifying the webhook ID.", + "toolkit": { + "name": "ArcadeFigmaApi", + "description": null, + "version": "0.1.0" + }, + "input": { + "parameters": [ + { + "name": "webhook_id_to_update", + "required": true, + "description": "Provide the ID of the Figma webhook you want to update.", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of webhook to update" + }, + "inferrable": true, + "http_endpoint_parameter_name": "webhook_id" + }, + { + "name": "webhook_update_data", + "required": true, + "description": "JSON object containing the data for the webhook update, including properties like event type, endpoint, passcode, status, and description.", + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": { + "event_type": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "PING", + "FILE_UPDATE", + "FILE_VERSION_UPDATE", + "FILE_DELETE", + "LIBRARY_PUBLISH", + "FILE_COMMENT", + "DEV_MODE_STATUS_UPDATE" + ], + "properties": null, + "inner_properties": null, + "description": "An enum representing the possible events that a webhook can subscribe to" + }, + "endpoint": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The HTTP endpoint that will receive a POST request when the event triggers. Max length 2048 characters." + }, + "passcode": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "String that will be passed back to your webhook endpoint to verify that it is being called by Figma. Max length 100 characters." + }, + "status": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "ACTIVE", + "PAUSED" + ], + "properties": null, + "inner_properties": null, + "description": "An enum representing the possible statuses you can set a webhook to:\n- `ACTIVE`: The webhook is healthy and receive all events\n- `PAUSED`: The webhook is paused and will not receive any events" + }, + "description": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "User provided description or name for the webhook. Max length 150 characters." + } + }, + "inner_properties": null, + "description": "The webhook to update." + }, + "inferrable": true, + "http_endpoint_parameter_name": "requestBody" + } + ] + }, + "output": { + "description": "Response from the API endpoint 'putWebhook'.", + "available_modes": [ + "value", + "error", + "null" + ], + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": null + } + }, + "requirements": { + "authorization": { + "provider_id": "arcade-figma", + "provider_type": "oauth2", + "id": null, + "oauth2": { + "scopes": [ + "webhooks:write" + ] + } + }, + "secrets": null, + "metadata": null + }, + "deprecation_message": null, + "metadata": { + "object_type": "api_wrapper_tool", + "version": "1.0.0", + "description": "Tools that enable LLMs to interact directly with the figma API." + }, + "http_endpoint": { + "metadata": { + "object_type": "http_endpoint", + "version": "1.1.0", + "description": "" + }, + "url": "https://api.figma.com/v2/webhooks/{webhook_id}", + "http_method": "PUT", + "headers": { + "Content-Type": "application/json" + }, + "parameters": [ + { + "name": "webhook_id", + "tool_parameter_name": "webhook_id_to_update", + "description": "ID of webhook to update", + "value_schema": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "ID of webhook to update" + }, + "accepted_as": "path", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + }, + { + "name": "requestBody", + "tool_parameter_name": "webhook_update_data", + "description": "The webhook to update.", + "value_schema": { + "val_type": "json", + "inner_val_type": null, + "enum": null, + "properties": { + "event_type": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "PING", + "FILE_UPDATE", + "FILE_VERSION_UPDATE", + "FILE_DELETE", + "LIBRARY_PUBLISH", + "FILE_COMMENT", + "DEV_MODE_STATUS_UPDATE" + ], + "properties": null, + "inner_properties": null, + "description": "An enum representing the possible events that a webhook can subscribe to" + }, + "endpoint": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "The HTTP endpoint that will receive a POST request when the event triggers. Max length 2048 characters." + }, + "passcode": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "String that will be passed back to your webhook endpoint to verify that it is being called by Figma. Max length 100 characters." + }, + "status": { + "val_type": "string", + "inner_val_type": null, + "enum": [ + "ACTIVE", + "PAUSED" + ], + "properties": null, + "inner_properties": null, + "description": "An enum representing the possible statuses you can set a webhook to:\n- `ACTIVE`: The webhook is healthy and receive all events\n- `PAUSED`: The webhook is paused and will not receive any events" + }, + "description": { + "val_type": "string", + "inner_val_type": null, + "enum": null, + "properties": null, + "inner_properties": null, + "description": "User provided description or name for the webhook. Max length 150 characters." + } + }, + "inner_properties": null, + "description": "The webhook to update." + }, + "accepted_as": "body", + "required": true, + "deprecated": false, + "default": null, + "documentation_urls": [] + } + ], + "documentation_urls": [], + "secrets": [ + { + "arcade_key": "auth_token", + "parameter_name": "Authorization", + "accepted_as": "header", + "formatted_value": "Bearer {authorization}", + "description": "The OAuth token to use for authentication.", + "is_auth_token": true + } + ], + "request_body_spec": "{\n \"description\": \"The webhook to update.\",\n \"required\": true,\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"event_type\": {\n \"type\": \"string\",\n \"description\": \"An enum representing the possible events that a webhook can subscribe to\",\n \"enum\": [\n \"PING\",\n \"FILE_UPDATE\",\n \"FILE_VERSION_UPDATE\",\n \"FILE_DELETE\",\n \"LIBRARY_PUBLISH\",\n \"FILE_COMMENT\",\n \"DEV_MODE_STATUS_UPDATE\"\n ]\n },\n \"endpoint\": {\n \"type\": \"string\",\n \"description\": \"The HTTP endpoint that will receive a POST request when the event triggers. Max length 2048 characters.\"\n },\n \"passcode\": {\n \"type\": \"string\",\n \"description\": \"String that will be passed back to your webhook endpoint to verify that it is being called by Figma. Max length 100 characters.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"description\": \"An enum representing the possible statuses you can set a webhook to:\\n- `ACTIVE`: The webhook is healthy and receive all events\\n- `PAUSED`: The webhook is paused and will not receive any events\",\n \"enum\": [\n \"ACTIVE\",\n \"PAUSED\"\n ]\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"User provided description or name for the webhook. Max length 150 characters.\"\n }\n },\n \"required\": [\n \"event_type\",\n \"team_id\",\n \"endpoint\",\n \"passcode\"\n ]\n }\n }\n }\n}", + "use_request_body_schema_mode": true, + "validate_request_body_schema": true + } +} diff --git a/toolkits/figma_api/pyproject.toml b/toolkits/figma_api/pyproject.toml new file mode 100644 index 00000000..ca32bf81 --- /dev/null +++ b/toolkits/figma_api/pyproject.toml @@ -0,0 +1,60 @@ +[build-system] +requires = [ "hatchling",] +build-backend = "hatchling.build" + +[project] +name = "arcade_figma_api" +version = "0.1.0" +description = "Tools that enable LLMs to interact directly with the figma API." +requires-python = ">=3.10" +dependencies = [ + "arcade-tdk>=3.0.0,<4.0.0", + "httpx[http2]>=0.27.2,<1.0.0", + "jsonschema>=4.0.0,<5.0.0", +] +[[project.authors]] +email = "support@arcade.dev" + +[project.optional-dependencies] +dev = [ + "arcade-mcp[all]>=1.2.0,<2.0.0", + "arcade-serve>=3.0.0,<4.0.0", + "pytest>=8.3.0,<8.4.0", + "pytest-cov>=4.0.0,<4.1.0", + "pytest-mock>=3.11.1,<3.12.0", + "pytest-asyncio>=0.24.0,<0.25.0", + "mypy>=1.5.1,<1.6.0", + "pre-commit>=3.4.0,<3.5.0", + "tox>=4.11.1,<4.12.0", + "ruff>=0.7.4,<0.8.0", +] + +# Tell Arcade.dev that this package is a toolkit +[project.entry-points.arcade_toolkits] +toolkit_name = "arcade_figma_api" + +# Use local path sources for arcade libs when working locally +[tool.uv.sources] +arcade-mcp = { path = "../../", editable = true } +arcade-serve = { path = "../../libs/arcade-serve/", editable = true } +arcade-tdk = { path = "../../libs/arcade-tdk/", editable = true } +[tool.mypy] +files = [ "arcade_figma_api/**/*.py",] +python_version = "3.10" +disallow_untyped_defs = "True" +disallow_any_unimported = "True" +no_implicit_optional = "True" +check_untyped_defs = "True" +warn_return_any = "True" +warn_unused_ignores = "True" +show_error_codes = "True" +ignore_missing_imports = "True" + +[tool.pytest.ini_options] +testpaths = [ "tests",] + +[tool.coverage.report] +skip_empty = true + +[tool.hatch.build.targets.wheel] +packages = [ "arcade_figma_api",] diff --git a/toolkits/figma_api/tests/__init__.py b/toolkits/figma_api/tests/__init__.py new file mode 100644 index 00000000..e69de29b