> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Gist

> GitHub Gist is a service provided by GitHub that allows users to share code snippets, notes, and other text-based content. It supports both public and private gists, enabling easy sharing and collaboration.

![Gist logo](https://mintcdn.com/composio-preview/GL28i3tBlbEbBd-f/images/toolkits/gist.png?fit=max\&auto=format\&n=GL28i3tBlbEbBd-f\&q=85\&s=14b865074550027677680f04cd1a79b0)

* **Category:** developer tools
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 20
* **Triggers:** 0
* **Slug:** `GIST`
* **Version:** 20261101\_00

## Tools

> [accordion] Check Gist Star
>
> **Slug:** `GIST_CHECK_GIST_STAR`
>
> Check if the authenticated user has starred a specific gist. Returns True if the gist is starred, False if not starred or if the gist doesn't exist. This is a read-only, idempotent operation that requires authentication but no special permissions.
>
> #### Input Parameters
>
> **gist\_id** `string` *required*
>
> The unique identifier of the gist to check. Can be a short numeric ID (e.g., '1305321') or a longer alphanumeric hash (e.g., 'aa5a315d61ae9438b18d').
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Gist
>
> **Slug:** `GIST_CREATE_GIST`
>
> Tool to create a new gist with one or more files. Use when you need to create a code snippet or text file to share. Note: Do not name your files 'gistfile' with a numerical suffix.
>
> #### Input Parameters
>
> **files** `object` *required*
>
> Names and content for the files that make up the gist. Each key is a filename (do not name files 'gistfile' with a numerical suffix), and each value contains the file content.
>
> **public** `boolean`
>
> Flag indicating whether the gist is public. Defaults to false (private gist).
>
> **description** `string`
>
> Description of the gist.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Gist Comment
>
> **Slug:** `GIST_CREATE_GIST_COMMENT`
>
> Tool to create a comment on a gist. Use when you need to add a comment to an existing gist.
>
> #### Input Parameters
>
> **body** `string` *required*
>
> The comment text to add to the gist.
>
> **gist\_id** `string` *required*
>
> The unique identifier of the gist to comment on.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Gist
>
> **Slug:** `GIST_DELETE_GIST`
>
> Delete a gist by ID. The result reports success for a 404 or 304 as well as a successful deletion, and reports a 403 as unsuccessful.
>
> #### Input Parameters
>
> **gist\_id** `string` *required*
>
> The unique identifier of the gist to delete. Can be a short numeric ID (e.g., '1305321') or a longer alphanumeric hash (e.g., 'aa5a315d61ae9438b18d').
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Gist Comment
>
> **Slug:** `GIST_DELETE_GIST_COMMENT`
>
> Delete a gist comment by gist ID and comment ID. The result reports success for a 404 as well as a successful deletion, and reports a 403 as unsuccessful.
>
> #### Input Parameters
>
> **gist\_id** `string` *required*
>
> The unique identifier of the gist containing the comment. Obtain this from list\_gists or other gist operations.
>
> **comment\_id** `integer` *required*
>
> The unique identifier of the comment to delete. Obtain this from list\_gist\_comments or get\_gist\_comment operations.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Fork Gist
>
> **Slug:** `GIST_FORK_GIST`
>
> Tool to fork a gist. Use when you need to create a copy of an existing gist under your own account.
>
> #### Input Parameters
>
> **gist\_id** `string` *required*
>
> The unique identifier of the gist to fork.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Gist
>
> **Slug:** `GIST_GET_GIST`
>
> Retrieve a gist by ID, including its file metadata and available contents. File contents or the file list may be truncated.
>
> #### Input Parameters
>
> **gist\_id** `string` *required*
>
> The unique identifier of the gist.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Gist Comment
>
> **Slug:** `GIST_GET_GIST_COMMENT`
>
> Tool to get a specific comment on a gist. Use when you need to retrieve details of a particular comment given gist\_id and comment\_id.
>
> #### Input Parameters
>
> **gist\_id** `string` *required*
>
> The ID of the gist
>
> **comment\_id** `integer` *required*
>
> The ID of the comment
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Gist Revision
>
> **Slug:** `GIST_GET_GIST_REVISION`
>
> Tool to retrieve a specific gist revision. Use when you need details of a past state for an existing gist by commit SHA.
>
> #### Input Parameters
>
> **sha** `string` *required*
>
> The commit SHA of the desired revision.
>
> **gist\_id** `string` *required*
>
> The unique identifier of the gist.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Gist Comments
>
> **Slug:** `GIST_LIST_GIST_COMMENTS`
>
> Tool to list comments on a gist. Use after confirming the gist\_id to retrieve comments for a specific gist. Example: 'List comments for gist abc123'.
>
> #### Input Parameters
>
> **page** `integer`
>
> Page number to fetch. Default: 1.
>
> **gist\_id** `string` *required*
>
> The ID of the gist to list comments for
>
> **per\_page** `integer`
>
> Results per page (max 100). Default: 30.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Gist Commits
>
> **Slug:** `GIST_LIST_GIST_COMMITS`
>
> Tool to list the commit history of a gist. Use after you have the gist ID to review its revisions.
>
> #### Input Parameters
>
> **page** `integer`
>
> Page number of the results to fetch
>
> **accept** `string`
>
> Response media type. Recommended: application/vnd.github+json
>
> **gist\_id** `string` *required*
>
> The unique identifier of the gist to list commits for.
>
> **per\_page** `integer`
>
> Number of results per page (max 100)
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Gist Forks
>
> **Slug:** `GIST_LIST_GIST_FORKS`
>
> List a page of forks for a gist by ID, with optional pagination.
>
> #### Input Parameters
>
> **page** `integer`
>
> Page number to fetch. Default: 1
>
> **gist\_id** `string` *required*
>
> The ID of the gist to list forks for
>
> **per\_page** `integer`
>
> Results per page (max 100). Default: 30
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Gists
>
> **Slug:** `GIST_LIST_GISTS`
>
> List the authenticated user's gists, with optional update-time filtering and pagination.
>
> #### Input Parameters
>
> **page** `integer`
>
> Page number of results to fetch. Default: 1 if not provided.
>
> **since** `string`
>
> Only show gists last updated after this ISO 8601 timestamp (YYYY-MM-DDTHH:MM:SSZ)
>
> **accept** `string`
>
> Media type for the response. Example: 'application/vnd.github+json'
>
> **per\_page** `integer`
>
> Number of results per page (1-100). Default: 30 if not provided.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Public Gists
>
> **Slug:** `GIST_LIST_PUBLIC_GISTS`
>
> Tool to list public gists sorted by most recently updated. Use when you need to discover recent public gists. Note: with pagination, you can fetch up to 3000 gists.
>
> #### Input Parameters
>
> **page** `integer`
>
> Page number of results to fetch. Default: 1 if not provided.
>
> **since** `string`
>
> Only show gists last updated after this ISO 8601 timestamp (YYYY-MM-DDTHH:MM:SSZ)
>
> **per\_page** `integer`
>
> Number of results per page (1-100). Default: 30 if not provided.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Starred Gists
>
> **Slug:** `GIST_LIST_STARRED_GISTS`
>
> List a page of the authenticated user's starred gists, optionally filtered by update time. Select pages to retrieve additional results.
>
> #### Input Parameters
>
> **page** `integer`
>
> Page number of the results to fetch
>
> **since** `string`
>
> Only list gists updated after this ISO 8601 timestamp (YYYY-MM-DDTHH:MM:SSZ)
>
> **accept** `string`
>
> Response media type. Recommended: application/vnd.github+json
>
> **per\_page** `integer`
>
> Number of results per page (max 100)
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List User Gists
>
> **Slug:** `GIST_LIST_USER_GISTS`
>
> Tool to list public gists for a specified GitHub user. Use when you have a username and need their gists.
>
> #### Input Parameters
>
> **page** `integer`
>
> Page number of results to fetch.
>
> **since** `string`
>
> Only show gists updated after this ISO 8601 timestamp (YYYY-MM-DDTHH:MM:SSZ)
>
> **per\_page** `integer`
>
> Number of results per page (1-100).
>
> **username** `string` *required*
>
> The handle for the GitHub user account
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Star a Gist
>
> **Slug:** `GIST_STAR_GIST`
>
> Star a GitHub gist. This operation is idempotent and will succeed even if the gist is already starred.
>
> #### Input Parameters
>
> **gist\_id** `string` *required*
>
> The unique identifier of the gist to star. Can be a short numeric ID (e.g., '1305321') or a longer alphanumeric hash (e.g., 'aa5a315d61ae9438b18d').
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Unstar a Gist
>
> **Slug:** `GIST_UNSTAR_GIST`
>
> Unstar a GitHub gist. The operation is idempotent; a not-found response is also reported as success, so success does not establish that the gist existed.
>
> #### Input Parameters
>
> **gist\_id** `string` *required*
>
> The unique identifier of the gist to unstar. Can be a short numeric ID (e.g., '1305321') or a longer alphanumeric hash (e.g., 'aa5a315d61ae9438b18d').
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Gist
>
> **Slug:** `GIST_UPDATE_GIST`
>
> Tool to update a gist's description and files. Use when you need to modify gist content, rename files, or delete files from a gist.
>
> #### Input Parameters
>
> **files** `object`
>
> The gist files to be updated, renamed, or deleted. Each key must match the current filename (including extension) of the targeted gist file. For example: 'hello.py'. To delete a file, set the value to null. For example: \{'hello.py': None}. To update content, provide \{'hello.py': \{'content': 'new content'}}. To rename, provide \{'hello.py': \{'filename': 'goodbye.py'}}.
>
> **gist\_id** `string` *required*
>
> The unique identifier of the gist to update.
>
> **description** `string`
>
> The updated description of the gist.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Gist Comment
>
> **Slug:** `GIST_UPDATE_GIST_COMMENT`
>
> Tool to update a Gist comment. Updates an existing comment on a gist. You must be the author of the comment to update it.
>
> #### Input Parameters
>
> **body** `string` *required*
>
> The updated text for the comment.
>
> **gist\_id** `string` *required*
>
> The ID of the Gist to which the comment belongs.
>
> **comment\_id** `integer` *required*
>
> The ID of the comment to update.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
