Create Gist

Creates a new gist with one or more files

Usage #

// Import the typed helper
import { createGist } from "@hotglue/sdk/github";
const result = await client.execute({
...createGist({
description: string,
public: bool,
files: record,
}),
userId: "user_123",
});
// result is typed as CreateGistOutput
const result = await client.execute({
integration: "github",
tool: "create_gist",
userId: "user_123",
input: {
description: string,
public: bool,
files: record,
},
});
// The agent will automatically use this tool when needed
const agent = new Agent({
tools: () => hotglueTools({
integrations: ["github"],
userId: "user_123",
}),
});
await agent.generate("run the Create Gist tool");

Required Permissions #

gist

Input Schema #

description string

Gist description

public bool

Whether the gist is public

default: false
files object required

Object with filename as key and object with content property as value

Output Schema #

id string required
html_url string required
public bool required
created_at string required

This tool calls: #

POST https://api.github.com/gists