get_projects
Retrieve all projects from Super Productivity, with optional filtering by project title to locate specific ones.
Instructions
Returns all projects in Super Productivity.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_projects"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Filter by project title |
Implementation Reference
- src/tools/projects.ts:10-21 (handler)Registration and handler for the get_projects tool. Calls SpClient.getProjects(query) and returns the result.
export function registerProjectTools(server: McpServer) { server.tool( "get_projects", "Returns all projects in Super Productivity.", { query: z.string().optional().describe("Filter by project title"), }, async ({ query }) => { const projects = await SpClient.getProjects(query); return ok(projects); } ); - src/tools/projects.ts:14-15 (schema)Input schema for get_projects: optional query string to filter by project title.
{ query: z.string().optional().describe("Filter by project title"), - src/index.ts:17-17 (registration)Registration call in the main index.ts that wires up the get_projects tool.
registerProjectTools(server); - src/sp-client.ts:289-296 (helper)The SpClient.getProjects helper that makes the REST API call to GET /projects with optional query filter.
getProjects(query?: string): Promise<Project[]> { return request( withQuery("/projects", { query, }), z.array(ProjectSchema) ); }, - src/sp-client.ts:40-44 (schema)ProjectSchema zod validation schema defining the shape of project objects returned by the API.
const ProjectSchema = z.object({ id: z.string(), title: z.string(), isArchived: z.boolean().default(false), }).passthrough();