list_document_comments
Retrieve comments on a specific Outline wiki document to review feedback and discussions. Specify document ID with optional pagination controls.
Instructions
Get list of comments on a document.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documentId | Yes | ||
| limit | No | ||
| offset | No |
Implementation Reference
- src/lib/handlers/comments.ts:44-53 (handler)The core handler function that executes the list_document_comments tool. It calls the Outline API to fetch comments for the given document ID with pagination, then formats and returns them.async list_document_comments(args: ListDocumentCommentsInput) { const { data } = await apiCall(() => apiClient.post<OutlineComment[]>('/comments.list', { documentId: args.documentId, limit: args.limit, offset: args.offset, }) ); return formatComments(data || []); },
- src/lib/schemas.ts:81-85 (schema)Zod schema defining the input parameters for the list_document_comments tool: documentId (required), limit (default 25), offset (default 0).export const listDocumentCommentsSchema = z.object({ documentId, limit: limit.default(25), offset, });
- src/lib/tools.ts:129-133 (registration)MCP tool registration using createTool, which converts the Zod schema to JSON schema and defines the tool name and description.createTool( 'list_document_comments', 'Get list of comments on a document.', 'list_document_comments' ),
- src/lib/schemas.ts:187-187 (schema)TypeScript type definition for the input, inferred from the Zod schema.export type ListDocumentCommentsInput = z.infer<typeof listDocumentCommentsSchema>;
- src/lib/schemas.ts:230-230 (registration)Mapping of tool name to its schema in the central toolSchemas object, used by tool definitions.list_document_comments: listDocumentCommentsSchema,