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

- **Category:** developer tools
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 20
- **Triggers:** 0
- **Slug:** `GIST`
- **Version:** 20260312_00

## Tools

### 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `gist_id` | string | Yes | 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `files` | object | Yes | 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 | No | Flag indicating whether the gist is public. Defaults to false (private gist). |
| `description` | string | No | Description of the gist. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | string | Yes | The comment text to add to the gist. |
| `gist_id` | string | Yes | The unique identifier of the gist to comment on. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Gist

**Slug:** `GIST_DELETE_GIST`

Tool to delete a gist. Use when you have a gist_id and want to permanently remove that gist. Example prompt: "Delete gist 'aa5a315d61ae9438b18d'".

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `gist_id` | string | Yes | 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Gist Comment

**Slug:** `GIST_DELETE_GIST_COMMENT`

Tool to delete a comment on a gist. Use when you have both the gist_id and comment_id and want to remove that comment. Example prompt: "Delete comment 42 from gist 'aa5a315d61ae9438b18d'".

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `gist_id` | string | Yes | The unique identifier of the gist containing the comment. Obtain this from list_gists or other gist operations. |
| `comment_id` | integer | Yes | The unique identifier of the comment to delete. Obtain this from list_gist_comments or get_gist_comment operations. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `gist_id` | string | Yes | The unique identifier of the gist to fork. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Gist

**Slug:** `GIST_GET_GIST`

Tool to retrieve a specific gist by its ID. Use when you have a gist_id and need complete gist details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `gist_id` | string | Yes | The unique identifier of the gist. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `gist_id` | string | Yes | The ID of the gist |
| `comment_id` | integer | Yes | The ID of the comment |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sha` | string | Yes | The commit SHA of the desired revision. |
| `gist_id` | string | Yes | The unique identifier of the gist. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number to fetch. Default: 1. |
| `gist_id` | string | Yes | The ID of the gist to list comments for |
| `per_page` | integer | No | Results per page (max 100). Default: 30. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number of the results to fetch |
| `accept` | string | No | Response media type. Recommended: application/vnd.github+json |
| `gist_id` | string | Yes | The unique identifier of the gist to list commits for. |
| `per_page` | integer | No | Number of results per page (max 100) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Gist Forks

**Slug:** `GIST_LIST_GIST_FORKS`

Tool to list forks of a gist. Use after obtaining a gist_id to retrieve all forks for the gist.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number to fetch. Default: 1 |
| `gist_id` | string | Yes | The ID of the gist to list forks for |
| `per_page` | integer | No | Results per page (max 100). Default: 30 |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Gists

**Slug:** `GIST_LIST_GISTS`

Tool to list the authenticated user's gists or all public gists if called anonymously. Use after setting a valid GitHub token in headers.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number of results to fetch. Default: 1 if not provided. |
| `since` | string | No | Only show gists last updated after this ISO 8601 timestamp (YYYY-MM-DDTHH:MM:SSZ) |
| `accept` | string | No | Media type for the response. Example: 'application/vnd.github+json' |
| `per_page` | integer | No | Number of results per page (1-100). Default: 30 if not provided. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number of results to fetch. Default: 1 if not provided. |
| `since` | string | No | Only show gists last updated after this ISO 8601 timestamp (YYYY-MM-DDTHH:MM:SSZ) |
| `per_page` | integer | No | Number of results per page (1-100). Default: 30 if not provided. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Starred Gists

**Slug:** `GIST_LIST_STARRED_GISTS`

Tool to list the authenticated user's starred gists. Use when you need to retrieve all gists the user has starred.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number of the results to fetch |
| `since` | string | No | Only list gists updated after this ISO 8601 timestamp (YYYY-MM-DDTHH:MM:SSZ) |
| `accept` | string | No | Response media type. Recommended: application/vnd.github+json |
| `per_page` | integer | No | Number of results per page (max 100) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number of results to fetch. |
| `since` | string | No | Only show gists updated after this ISO 8601 timestamp (YYYY-MM-DDTHH:MM:SSZ) |
| `per_page` | integer | No | Number of results per page (1-100). |
| `username` | string | Yes | The handle for the GitHub user account |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `gist_id` | string | Yes | 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Unstar a Gist

**Slug:** `GIST_UNSTAR_GIST`

Unstar a GitHub gist. This operation is idempotent and will succeed even if the gist is not currently starred.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `gist_id` | string | Yes | 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `files` | object | No | 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 | Yes | The unique identifier of the gist to update. |
| `description` | string | No | The updated description of the gist. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | string | Yes | The updated text for the comment. |
| `gist_id` | string | Yes | The ID of the Gist to which the comment belongs. |
| `comment_id` | integer | Yes | The ID of the comment to update. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
