Skip to main content
Glama
fleagne

Backlog MCP Server

by fleagne

backlog_get_projects

Retrieve project details from Backlog API, filtering by archived status or administrator access. Supports pagination with a maximum of 20 results per request and offset functionality for efficient data handling.

Instructions

Performs list project get using the Backlog Projects get API. Supports pagination, content filtering. Maximum 20 results per request, with offset for pagination.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoOnly applies to administrators. If true, it returns all projects. If false, it returns only projects they have joined (set to false by default).
archivedNoFor unspecified parameters, this form returns all projects. For false parameters, it returns unarchived projects. For true parameters, it returns archived projects.

Implementation Reference

  • The main handler function for the 'backlog_get_projects' tool. It validates input parameters using ProjectsParamsSchema, calls projectService.getProjects, and formats the response as MCP content.
    const handleGetProjects: ToolHandler = async (args) => {
    	try {
    		try {
    			const validatedParams = ProjectsParamsSchema.parse(args);
    
    			const text = await projectService.getProjects(validatedParams);
    
    			return {
    				content: [
    					{
    						type: "text",
    						text: `Results for your query:\n${text}`,
    					},
    				],
    				isError: false,
    			};
    		} catch (validationError) {
    			throw new ValidationError(
    				`Invalid parameters: ${validationError instanceof Error ? validationError.message : String(validationError)}`,
    			);
    		}
    	} catch (error) {
    		return {
    			content: [
    				{
    					type: "text",
    					text: `Error: ${formatError(error)}`,
    				},
    			],
    			isError: true,
    		};
    	}
    };
  • Maps the tool name 'backlog_get_projects' to its handler function handleGetProjects in the toolHandlers registry.
    export const toolHandlers: Record<ToolName, ToolHandler> = {
    	backlog_get_projects: handleGetProjects,
    	backlog_get_project: handleGetProject,
    	backlog_get_issues: handleGetIssues,
    	backlog_get_issue: handleGetIssue,
    	backlog_add_issue: handleAddIssue,
    	backlog_update_issue: handleUpdateIssue,
    	backlog_delete_issue: handleDeleteIssue,
    	backlog_get_wikis: handleGetWikis,
    	backlog_get_wiki: handleGetWiki,
    	backlog_add_wiki: handleAddWiki,
    	backlog_update_wiki: handleUpdateWiki,
    	backlog_delete_wiki: handleDeleteWiki,
    };
  • Zod schema for input validation of the backlog_get_projects tool parameters: archived (boolean, optional), all (boolean, optional, default false).
    export const ProjectsParamsSchema = z.object({
    	archived: z
    		.boolean()
    		.optional()
    		.describe(
    			"For unspecified parameters, this form returns all projects. For false parameters, it returns unarchived projects. For true parameters, it returns archived projects.",
    		),
    	all: z
    		.boolean()
    		.optional()
    		.default(false)
    		.describe(
    			"Only applies to administrators. If true, it returns all projects. If false, it returns only projects they have joined (set to false by default).",
    		),
    });
  • MCP Tool definition for 'backlog_get_projects', including name, description, and inputSchema derived from ProjectsParamsSchema.
    export const PROJECTS_TOOL: Tool = createTool(
    	"backlog_get_projects",
    	"Performs list project get using the Backlog Projects get API. " +
    		"Supports pagination, content filtering. " +
    		"Maximum 20 results per request, with offset for pagination.",
    	ProjectsParamsSchema,
    );
  • Initializes the ToolRegistry with ALL_TOOLS, which includes the backlog_get_projects tool.
    export const toolRegistry = new ToolRegistry(ALL_TOOLS);

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must disclose behavior. It mentions pagination but does not state read-only nature, authentication needs, or potential side effects. Incomplete for safety profile.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with action. Some technical jargon ('Backlog Projects get API') but no wasted words. Could be slightly more natural.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, so description should explain return value or structure; it does not. Covers pagination and filtering basics but lacks response format details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 100% description coverage for both boolean parameters, so the schema already explains parameter meanings. Tool description adds minimal value beyond mentioning pagination and filtering.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it lists projects using the Backlog API and mentions pagination. It distinguishes from sibling backlog_get_project (singular) which retrieves a single project.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives like backlog_get_issues or filtering options. Lacks explicit when-to-use or when-not-to-use instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools