@aashari/mcp-server-atlassian-jira
Version:
Node.js/TypeScript MCP server for Atlassian Jira. Equips AI systems (LLMs) with tools to list/get projects, search/get issues (using JQL/ID), and view dev info (commits, PRs). Connects AI capabilities directly into Jira project management and issue tracki
126 lines (125 loc) • 5.66 kB
TypeScript
import { Issue, IssuesResponse, SearchIssuesParams, GetIssueByIdParams, PageOfComments, IssueCommentSchema, ListCommentsParams, AddCommentParams } from './vendor.atlassian.issues.types.js';
import { z } from 'zod';
/**
* @namespace VendorAtlassianIssuesService
* @description Service for interacting with Jira Issues API.
* Provides methods for searching issues and retrieving issue details.
* All methods require valid Atlassian credentials configured in the environment.
*/
/**
* Search for Jira issues using JQL and other criteria
*
* Retrieves a list of issues from Jira based on JQL query and other
* search parameters. Supports pagination, field selection, and expansion.
*
* @async
* @memberof VendorAtlassianIssuesService
* @param {SearchIssuesParams} [params={}] - Optional parameters for customizing the search
* @param {string} [params.jql] - JQL query string for filtering issues
* @param {number} [params.startAt] - Pagination start index
* @param {number} [params.maxResults] - Maximum number of results to return
* @param {string[]} [params.fields] - Issue fields to include in response
* @param {string[]} [params.expand] - Issue data to expand in response
* @param {boolean} [params.validateQuery] - Whether to validate the JQL query
* @param {string[]} [params.properties] - Issue properties to include in response
* @param {boolean} [params.fieldsByKeys] - Whether to use field keys instead of IDs
* @param {string} [params.nextPageToken] - Token for retrieving next page of results
* @param {boolean} [params.reconcileIssues] - Whether to reconcile issue data
* @returns {Promise<IssuesResponse>} Promise containing the issues search response with results and pagination info
* @throws {Error} If Atlassian credentials are missing or API request fails
* @example
* // Search for issues with pagination
* const response = await search({
* jql: "project = ABC AND status = 'In Progress'",
* maxResults: 10
* });
*/
declare function search(params?: SearchIssuesParams): Promise<IssuesResponse>;
/**
* Get detailed information about a specific Jira issue
*
* Retrieves comprehensive details about a single issue, including metadata,
* description, comments, and more.
*
* @async
* @memberof VendorAtlassianIssuesService
* @param {string} idOrKey - The ID or key of the issue to retrieve
* @param {GetIssueByIdParams} [params={}] - Optional parameters for customizing the response
* @param {string[]} [params.fields] - Issue fields to include in response
* @param {string[]} [params.expand] - Issue data to expand in response
* @param {string[]} [params.properties] - Issue properties to include in response
* @param {boolean} [params.fieldsByKeys] - Whether to use field keys instead of IDs
* @param {boolean} [params.updateHistory] - Whether to update issue view history
* @returns {Promise<Issue>} Promise containing the detailed issue information
* @throws {Error} If Atlassian credentials are missing or API request fails
* @example
* // Get issue details with expanded changelog
* const issue = await get('ABC-123', {
* expand: ['changelog']
* });
*/
declare function get(idOrKey: string, params?: GetIssueByIdParams): Promise<Issue>;
/**
* Get comments for a specific Jira issue
*
* Retrieves the list of comments for an issue with pagination support.
* Can be sorted and expanded as needed.
*
* @async
* @memberof VendorAtlassianIssuesService
* @param {string} issueIdOrKey - The ID or key of the issue to get comments for
* @param {ListCommentsParams} [params={}] - Optional parameters for customizing the response
* @param {number} [params.startAt] - Pagination start index
* @param {number} [params.maxResults] - Maximum number of results to return
* @param {string} [params.orderBy] - Field and direction to order results by
* @param {string[]} [params.expand] - Comment data to expand in response (e.g., 'renderedBody')
* @returns {Promise<PageOfComments>} Promise containing the comments with pagination information
* @throws {Error} If Atlassian credentials are missing or API request fails
* @example
* // Get comments for an issue with pagination
* const comments = await getComments('ABC-123', {
* maxResults: 10,
* expand: ['renderedBody']
* });
*/
declare function getComments(issueIdOrKey: string, params?: ListCommentsParams): Promise<PageOfComments>;
/**
* Add a comment to a specific Jira issue
*
* Creates a new comment on the specified issue with the provided content.
* The comment body must be provided in Atlassian Document Format (ADF).
*
* @async
* @memberof VendorAtlassianIssuesService
* @param {string} issueIdOrKey - The ID or key of the issue to add a comment to
* @param {AddCommentParams} commentData - Parameters for the comment to add
* @returns {Promise<z.infer<typeof IssueCommentSchema>>} Promise containing the created comment information
* @throws {Error} If Atlassian credentials are missing or API request fails
* @example
* // Add a comment with ADF content
* const comment = await addComment('ABC-123', {
* body: {
* version: 1,
* type: "doc",
* content: [
* {
* type: "paragraph",
* content: [
* {
* type: "text",
* text: "This is a test comment"
* }
* ]
* }
* ]
* }
* });
*/
declare function addComment(issueIdOrKey: string, commentData: AddCommentParams): Promise<z.infer<typeof IssueCommentSchema>>;
declare const _default: {
search: typeof search;
get: typeof get;
getComments: typeof getComments;
addComment: typeof addComment;
};
export default _default;