confluence_search
Search and retrieve Confluence content using CQL queries via the MCP Atlassian Server, enabling efficient access to Confluence data within the MCP interface.
Instructions
Search Confluence content using CQL
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Results limit (1-50) | |
| query | Yes | CQL query string |
Input Schema (JSON Schema)
{
"properties": {
"limit": {
"description": "Results limit (1-50)",
"maximum": 50,
"minimum": 1,
"type": "number"
},
"query": {
"description": "CQL query string",
"type": "string"
}
},
"required": [
"query"
],
"type": "object"
}
Implementation Reference
- src/index.ts:99-122 (handler)Handler for the 'confluence_search' tool call. Parses arguments, executes Confluence search API request using CQL query, maps and formats results into JSON text content for response.case 'confluence_search': { const { query, limit = 10 } = request.params.arguments as any; const response = await this.confluenceAxios.get('/content/search', { params: { cql: query, limit: limit, expand: 'space' } }); return { content: [{ type: 'text', text: JSON.stringify(response.data.results.map((r: any) => ({ id: r.id, title: r.title, type: r.type, space: r.space?.name, url: `${CONFLUENCE_URL}${r._links?.webui}`, lastModified: r.history?.lastUpdated?.when })), null, 2) }] }; }
- src/index.ts:72-93 (registration)Registration of the 'confluence_search' tool in the ListTools handler, including name, description, and input schema definition.{ name: 'confluence_search', description: 'Search Confluence content using CQL', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'CQL query string' }, limit: { type: 'number', description: 'Results limit (1-50)', minimum: 1, maximum: 50 } }, required: ['query'] } } ] }));