get-project-template-list
Retrieve available task templates for a Dooray project to create tasks with predefined structures like bug reports or feature requests. Supports pagination for large template lists.
Instructions
Get list of project task templates.
Templates are pre-created task structures with predefined title and body content. This tool retrieves all available templates in a project.
URL Pattern Recognition: When given a Dooray URL like "https://nhnent.dooray.com/task/PROJECT_ID", extract the PROJECT_ID (the first numeric ID after "/task/") and use it as the projectId parameter.
Note: Returns compact response with essential fields only (id and templateName).
Pagination:
Default page size is 20 (maximum: 100)
Use page parameter to get additional pages if totalCount > size
Set size parameter to control items per page (max: 100)
Examples:
Get all templates (first page): {"projectId": "123456"}
Get second page: {"projectId": "123456", "page": 1, "size": 20}
Get with custom page size: {"projectId": "123456", "page": 0, "size": 50}
Returns a paginated response with totalCount and an array of templates containing id and templateName.
Templates help users quickly create tasks with predefined structure and content, useful for common task types like bug reports, feature requests, or documentation tasks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID to get templates from | |
| page | No | Page number for pagination (default: 0) | |
| size | No | Number of items per page (default: 20, max: 100) |
Implementation Reference
- The handler function that implements the core logic of the 'get-project-template-list' tool. It calls the projects API to retrieve paginated templates, filters the data for compact response, stringifies to JSON, and handles errors.export async function getProjectTemplateListHandler(args: GetProjectTemplateListInput) { try { const result = await projectsApi.getProjectTemplates({ projectId: args.projectId, page: args.page, size: args.size, }); // Filter to compact response to reduce token usage const compactResult = { totalCount: result.totalCount, data: result.data.map(filterTemplateForList), }; return { content: [ { type: 'text', text: JSON.stringify(compactResult, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error: ${formatError(error)}`, }, ], isError: true, }; } }
- Zod schema for validating the tool's input parameters (projectId required, page and size optional). Used during tool execution for argument validation.export const getProjectTemplateListSchema = z.object({ projectId: z.string().describe('Project ID to get templates from'), page: z.number().optional().describe('Page number (default: 0)'), size: z.number().optional().describe('Items per page (default: 20, max: 100)'), });
- src/index.ts:59-59 (registration)Registers the tool's handler and schema in the central toolRegistry object, which is used to dispatch call_tool requests to the correct handler.'get-project-template-list': { handler: getProjectTemplateListHandler, schema: getProjectTemplateListSchema },
- src/index.ts:82-82 (registration)Adds the tool specification (name, description, inputSchema) to the tools array returned by list_tools requests.getProjectTemplateListTool,
- Tool specification object including name, detailed description, and JSON inputSchema for MCP list_tools response. Note: description has escaped newlines and quotes.export const getProjectTemplateListTool = { name: 'get-project-template-list', description: `Get list of project task templates. Templates are pre-created task structures with predefined title and body content. This tool retrieves all available templates in a project. **URL Pattern Recognition**: When given a Dooray URL like "https://nhnent.dooray.com/task/PROJECT_ID", extract the PROJECT_ID (the first numeric ID after "/task/") and use it as the projectId parameter. **Note**: Returns compact response with essential fields only (id and templateName). **Pagination**: - Default page size is 20 (maximum: 100) - Use page parameter to get additional pages if totalCount > size - Set size parameter to control items per page (max: 100) Examples: - Get all templates (first page): {"projectId": "123456"} - Get second page: {"projectId": "123456", "page": 1, "size": 20} - Get with custom page size: {"projectId": "123456", "page": 0, "size": 50} Returns a paginated response with totalCount and an array of templates containing id and templateName. Templates help users quickly create tasks with predefined structure and content, useful for common task types like bug reports, feature requests, or documentation tasks.`, inputSchema: { type: 'object', properties: { projectId: { type: 'string', description: 'Project ID to get templates from', }, page: { type: 'number', description: 'Page number for pagination (default: 0)', }, size: { type: 'number', description: 'Number of items per page (default: 20, max: 100)', }, }, required: ['projectId'], }, };