Home/Tools/@tpmjs/tools-github

createIssueComment

@tpmjs/tools-github

Add a comment to an existing GitHub issue or pull request.

Official
ops
v0.2.0
MIT
⚠️

This tool is currently broken

Execution Failed
Runtime error with test parameters
Failed to create issue comment: Not found: Not Found

Last checked: 3/1/2026, 4:26:47 AM

Interactive Playground

Test @tpmjs/tools-github (createIssueComment) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install @tpmjs/tools-github
pnpm add @tpmjs/tools-github
yarn add @tpmjs/tools-github
bun add @tpmjs/tools-github
deno add npm:@tpmjs/tools-github

2. Import the tool

import { createIssueComment } from '@tpmjs/tools-github';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { createIssueComment } from '@tpmjs/tools-github';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { createIssueComment },
  prompt: 'Your prompt here...',
});

console.log(result.text);

Signature

(body: string, repo: string, owner: string, issue_number: number) => Promise<unknown>

Tags

add
agent
comment
create
devops
existing
git
github
issue
ops
pull
request
tpmjs

Parameters

Available configuration options

Auto-extracted
owner
Required
Type: string

Repository owner.

repo
Required
Type: string

Repository name.

issue_number
Required
Type: number

Issue number to comment on.

body
Required
Type: string

Comment body (supports Markdown).

Schema extracted: 3/1/2026, 4:26:47 AM

README

@tpmjs/tools-github

GitHub API tools for AI agents. Manage repos, issues, pull requests, commits, branches, releases, gists, and Actions workflows.

Installation

npm install @tpmjs/tools-github

Setup

Set your GitHub personal access token:

export GITHUB_TOKEN="ghp_..."

Usage

import { getRepo, listIssues, searchCode } from '@tpmjs/tools-github';

const repo = await getRepo.execute({ owner: 'vercel', repo: 'next.js' });
const issues = await listIssues.execute({ owner: 'vercel', repo: 'next.js', state: 'open', per_page: 5 });
const results = await searchCode.execute({ q: 'useState language:typescript', per_page: 10 });

Tools

ToolDescription
getRepoGet details of a GitHub repository
listReposList repositories for a user or organization
searchRepositoriesSearch GitHub repositories by query
createIssueCreate a new issue on a repository
getIssueGet details of a specific issue
listIssuesList issues with state and label filters
createIssueCommentAdd a comment to an issue or PR
getPullRequestGet details of a specific pull request
listPullRequestsList pull requests with filters
getFileContentGet file or directory contents from a repo
searchCodeSearch for code across GitHub
listBranchesList branches on a repository
getCommitGet details of a specific commit
listCommitsList commits with path and author filters
listReleasesList releases on a repository
getReleaseGet a specific release by tag name
createGistCreate a new GitHub Gist
listGistsList gists for a user
listWorkflowRunsList GitHub Actions workflow runs
getWorkflowRunGet details of a workflow run

License

MIT

Statistics

Downloads/month

200

GitHub Stars

15

Quality Score

89%

Bundle Size

NPM Keywords

tpmjs
github
git
devops
agent

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai
createIssueComment | TPMJS | TPMJS