Skip to main content
Glama
formatAdf.ts912 B
/** * Jira ADF Formatting Utilities * * Provides functions to format text into Atlassian Document Format (ADF). */ import type { ADFDocument } from '../types/atlassianDocument.types' /** * Transforms plain text descriptions into Atlassian Document Format * @param text The plain text to transform * @returns An ADF document object */ export function convertToAdf(text: string): ADFDocument { return { content: [ { content: [ { text: text, type: 'text', }, ], type: 'paragraph', }, ], type: 'doc', version: 1, } } /** * Transforms plain text into Atlassian Document Format. * Returns undefined if the input is not a non-empty string. */ export function formatDescriptionForAdf(description: unknown): ADFDocument | undefined { if (typeof description === 'string' && description.length > 0) { return convertToAdf(description) } return undefined }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tbreeding/jira-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server