@aashari/mcp-server-atlassian-confluence
Version:
Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP in
49 lines (48 loc) • 1.91 kB
TypeScript
/**
* Standardized formatting utilities for consistent output across all CLI and Tool interfaces.
* These functions should be used by all formatters to ensure consistent formatting.
*/
/**
* Format a date in a standardized way: YYYY-MM-DD HH:MM:SS UTC
* @param dateString - ISO date string or Date object
* @returns Formatted date string
*/
export declare function formatDate(dateString?: string | Date): string;
/**
* Format a URL as a markdown link
* @param url - URL to format
* @param title - Link title
* @returns Formatted markdown link
*/
export declare function formatUrl(url?: string, title?: string): string;
/**
* Format a heading with consistent style
* @param text - Heading text
* @param level - Heading level (1-6)
* @returns Formatted heading
*/
export declare function formatHeading(text: string, level?: number): string;
/**
* Format a list of key-value pairs as a bullet list
* @param items - Object with key-value pairs
* @param keyFormatter - Optional function to format keys
* @returns Formatted bullet list
*/
export declare function formatBulletList(items: Record<string, unknown>, keyFormatter?: (key: string) => string): string;
/**
* Format a separator line
* @returns Separator line
*/
export declare function formatSeparator(): string;
/**
* Truncate content for AI consumption and add guidance if truncated
*
* When responses exceed the token limit, this function truncates the content
* and appends guidance for the AI to either access the full response from
* the raw log file or refine the request with better filtering.
*
* @param content - The formatted response content
* @param rawResponsePath - Optional path to the raw response file in /tmp/mcp/
* @returns Truncated content with guidance if needed, or original content if within limits
*/
export declare function truncateForAI(content: string, rawResponsePath?: string | null): string;