diff --git a/plane_mcp/tools/cycles.py b/plane_mcp/tools/cycles.py index c417134..790a30c 100644 --- a/plane_mcp/tools/cycles.py +++ b/plane_mcp/tools/cycles.py @@ -25,17 +25,7 @@ def list_cycles( project_id: str, params: dict[str, Any] | None = None, ) -> list[Cycle]: - """ - List all cycles in a project. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - params: Optional query parameters as a dictionary - - Returns: - List of Cycle objects - """ + """List all cycles in a project.""" client, workspace_slug = get_plane_client_context() response: PaginatedCycleResponse = client.cycles.list( workspace_slug=workspace_slug, project_id=project_id, params=params @@ -54,24 +44,7 @@ def create_cycle( external_id: str | None = None, timezone: str | None = None, ) -> Cycle: - """ - Create a new cycle. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - name: Cycle name - owned_by: UUID of the user who owns the cycle - description: Cycle description - start_date: Cycle start date (ISO 8601 format) - end_date: Cycle end date (ISO 8601 format) - external_source: External system source name - external_id: External system identifier - timezone: Cycle timezone - - Returns: - Created Cycle object - """ + """Create a new cycle.""" client, workspace_slug = get_plane_client_context() data = CreateCycle( @@ -90,17 +63,7 @@ def create_cycle( @mcp.tool() def retrieve_cycle(project_id: str, cycle_id: str) -> Cycle: - """ - Retrieve a cycle by ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - cycle_id: UUID of the cycle - - Returns: - Cycle object - """ + """Retrieve a cycle by ID.""" client, workspace_slug = get_plane_client_context() return client.cycles.retrieve( workspace_slug=workspace_slug, project_id=project_id, cycle_id=cycle_id @@ -119,25 +82,7 @@ def update_cycle( external_id: str | None = None, timezone: str | None = None, ) -> Cycle: - """ - Update a cycle by ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - cycle_id: UUID of the cycle - name: Cycle name - description: Cycle description - start_date: Cycle start date (ISO 8601 format) - end_date: Cycle end date (ISO 8601 format) - owned_by: UUID of the user who owns the cycle - external_source: External system source name - external_id: External system identifier - timezone: Cycle timezone - - Returns: - Updated Cycle object - """ + """Update a cycle by ID.""" client, workspace_slug = get_plane_client_context() data = UpdateCycle( @@ -157,14 +102,7 @@ def update_cycle( @mcp.tool() def delete_cycle(project_id: str, cycle_id: str) -> None: - """ - Delete a cycle by ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - cycle_id: UUID of the cycle - """ + """Delete a cycle by ID.""" client, workspace_slug = get_plane_client_context() client.cycles.delete( workspace_slug=workspace_slug, project_id=project_id, cycle_id=cycle_id @@ -175,17 +113,7 @@ def list_archived_cycles( project_id: str, params: dict[str, Any] | None = None, ) -> list[Cycle]: - """ - List archived cycles in a project. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - params: Optional query parameters as a dictionary - - Returns: - List of archived Cycle objects - """ + """List archived cycles in a project.""" client, workspace_slug = get_plane_client_context() response: PaginatedArchivedCycleResponse = client.cycles.list_archived( workspace_slug=workspace_slug, project_id=project_id, params=params @@ -198,15 +126,7 @@ def add_work_items_to_cycle( cycle_id: str, issue_ids: list[str], ) -> None: - """ - Add work items to a cycle. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - cycle_id: UUID of the cycle - issue_ids: List of work item IDs to add to the cycle - """ + """Add work items to a cycle.""" client, workspace_slug = get_plane_client_context() client.cycles.add_work_items( workspace_slug=workspace_slug, @@ -221,15 +141,7 @@ def remove_work_item_from_cycle( cycle_id: str, work_item_id: str, ) -> None: - """ - Remove a work item from a cycle. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - cycle_id: UUID of the cycle - work_item_id: UUID of the work item to remove - """ + """Remove a work item from a cycle.""" client, workspace_slug = get_plane_client_context() client.cycles.remove_work_item( workspace_slug=workspace_slug, @@ -244,18 +156,7 @@ def list_cycle_work_items( cycle_id: str, params: dict[str, Any] | None = None, ) -> list[WorkItem]: - """ - List work items in a cycle. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - cycle_id: UUID of the cycle - params: Optional query parameters as a dictionary - - Returns: - List of WorkItem objects in the cycle - """ + """List work items in a cycle.""" client, workspace_slug = get_plane_client_context() response: PaginatedCycleWorkItemResponse = client.cycles.list_work_items( workspace_slug=workspace_slug, @@ -271,15 +172,7 @@ def transfer_cycle_work_items( cycle_id: str, new_cycle_id: str, ) -> None: - """ - Transfer work items from one cycle to another. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - cycle_id: UUID of the source cycle - new_cycle_id: UUID of the target cycle to transfer issues to - """ + """Transfer work items from one cycle to another.""" client, workspace_slug = get_plane_client_context() data = TransferCycleWorkItemsRequest(new_cycle_id=new_cycle_id) @@ -293,17 +186,7 @@ def transfer_cycle_work_items( @mcp.tool() def archive_cycle(project_id: str, cycle_id: str) -> bool: - """ - Archive a cycle. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - cycle_id: UUID of the cycle - - Returns: - True if the cycle was archived successfully - """ + """Archive a cycle.""" client, workspace_slug = get_plane_client_context() return client.cycles.archive( workspace_slug=workspace_slug, project_id=project_id, cycle_id=cycle_id @@ -311,17 +194,7 @@ def archive_cycle(project_id: str, cycle_id: str) -> bool: @mcp.tool() def unarchive_cycle(project_id: str, cycle_id: str) -> bool: - """ - Unarchive a cycle. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - cycle_id: UUID of the cycle - - Returns: - True if the cycle was unarchived successfully - """ + """Unarchive a cycle.""" client, workspace_slug = get_plane_client_context() return client.cycles.unarchive( workspace_slug=workspace_slug, project_id=project_id, cycle_id=cycle_id diff --git a/plane_mcp/tools/initiatives.py b/plane_mcp/tools/initiatives.py index 98192f4..06c611e 100644 --- a/plane_mcp/tools/initiatives.py +++ b/plane_mcp/tools/initiatives.py @@ -21,16 +21,7 @@ def register_initiative_tools(mcp: FastMCP) -> None: def list_initiatives( params: dict[str, Any] | None = None, ) -> list[Initiative]: - """ - List all initiatives in a workspace. - - Args: - workspace_slug: The workspace slug identifier - params: Optional query parameters as a dictionary (e.g., per_page, cursor) - - Returns: - List of Initiative objects - """ + """List all initiatives in a workspace.""" client, workspace_slug = get_plane_client_context() response: PaginatedInitiativeResponse = client.initiatives.list( workspace_slug=workspace_slug, params=params @@ -47,22 +38,7 @@ def create_initiative( state: InitiativeState | str | None = None, lead: str | None = None, ) -> Initiative: - """ - Create a new initiative in the workspace. - - Args: - workspace_slug: The workspace slug identifier - name: Initiative name - description_html: HTML description of the initiative - start_date: Initiative start date (ISO 8601 format) - end_date: Initiative end date (ISO 8601 format) - logo_props: Logo properties dictionary - state: Initiative state (DRAFT, PLANNED, ACTIVE, COMPLETED, CLOSED) - lead: UUID of the user who leads the initiative - - Returns: - Created Initiative object - """ + """Create a new initiative in the workspace.""" client, workspace_slug = get_plane_client_context() data = CreateInitiative( @@ -79,16 +55,7 @@ def create_initiative( @mcp.tool() def retrieve_initiative(initiative_id: str) -> Initiative: - """ - Retrieve an initiative by ID. - - Args: - workspace_slug: The workspace slug identifier - initiative_id: UUID of the initiative - - Returns: - Initiative object - """ + """Retrieve an initiative by ID.""" client, workspace_slug = get_plane_client_context() return client.initiatives.retrieve( workspace_slug=workspace_slug, initiative_id=initiative_id @@ -105,23 +72,7 @@ def update_initiative( state: InitiativeState | str | None = None, lead: str | None = None, ) -> Initiative: - """ - Update an initiative by ID. - - Args: - workspace_slug: The workspace slug identifier - initiative_id: UUID of the initiative - name: Initiative name - description_html: HTML description of the initiative - start_date: Initiative start date (ISO 8601 format) - end_date: Initiative end date (ISO 8601 format) - logo_props: Logo properties dictionary - state: Initiative state (DRAFT, PLANNED, ACTIVE, COMPLETED, CLOSED) - lead: UUID of the user who leads the initiative - - Returns: - Updated Initiative object - """ + """Update an initiative by ID.""" client, workspace_slug = get_plane_client_context() data = UpdateInitiative( @@ -140,12 +91,6 @@ def update_initiative( @mcp.tool() def delete_initiative(initiative_id: str) -> None: - """ - Delete an initiative by ID. - - Args: - workspace_slug: The workspace slug identifier - initiative_id: UUID of the initiative - """ + """Delete an initiative by ID.""" client, workspace_slug = get_plane_client_context() client.initiatives.delete(workspace_slug=workspace_slug, initiative_id=initiative_id) diff --git a/plane_mcp/tools/intake.py b/plane_mcp/tools/intake.py index 572a985..9563a82 100644 --- a/plane_mcp/tools/intake.py +++ b/plane_mcp/tools/intake.py @@ -22,23 +22,13 @@ def list_intake_work_items( project_id: str, params: dict[str, Any] | None = None, ) -> list[IntakeWorkItem]: - """ - List all intake work items in a project. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - params: Optional query parameters as a dictionary (e.g., per_page, cursor) - - Returns: - List of IntakeWorkItem objects - """ + """List all intake work items in a project.""" client, workspace_slug = get_plane_client_context() - + query_params = None if params: query_params = PaginatedQueryParams(**params) - + response: PaginatedIntakeWorkItemResponse = client.intake.list( workspace_slug=workspace_slug, project_id=project_id, params=query_params ) @@ -49,17 +39,7 @@ def create_intake_work_item( project_id: str, data: dict[str, Any], ) -> IntakeWorkItem: - """ - Create a new intake work item in a project. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - data: Intake work item data as a dictionary - - Returns: - Created IntakeWorkItem object - """ + """Create a new intake work item in a project.""" client, workspace_slug = get_plane_client_context() intake_data = CreateIntakeWorkItem(**data) @@ -74,25 +54,13 @@ def retrieve_intake_work_item( work_item_id: str, params: dict[str, Any] | None = None, ) -> IntakeWorkItem: - """ - Retrieve an intake work item by work item ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - work_item_id: UUID of the work item (use the issue field from - IntakeWorkItem response, not the intake work item ID) - params: Optional query parameters as a dictionary (e.g., expand, fields) - - Returns: - IntakeWorkItem object - """ + """Retrieve an intake work item by work item ID (use the issue field, not the intake work item ID).""" client, workspace_slug = get_plane_client_context() - + query_params = None if params: query_params = RetrieveQueryParams(**params) - + return client.intake.retrieve( workspace_slug=workspace_slug, project_id=project_id, @@ -106,19 +74,7 @@ def update_intake_work_item( work_item_id: str, data: dict[str, Any], ) -> IntakeWorkItem: - """ - Update an intake work item by work item ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - work_item_id: UUID of the work item (use the issue field from - IntakeWorkItem response, not the intake work item ID) - data: Updated intake work item data as a dictionary - - Returns: - Updated IntakeWorkItem object - """ + """Update an intake work item by work item ID (use the issue field, not the intake work item ID).""" client, workspace_slug = get_plane_client_context() intake_data = UpdateIntakeWorkItem(**data) @@ -132,17 +88,8 @@ def update_intake_work_item( @mcp.tool() def delete_intake_work_item(project_id: str, work_item_id: str) -> None: - """ - Delete an intake work item by work item ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - work_item_id: UUID of the work item (use the issue field from - IntakeWorkItem response, not the intake work item ID) - """ + """Delete an intake work item by work item ID (use the issue field, not the intake work item ID).""" client, workspace_slug = get_plane_client_context() client.intake.delete( workspace_slug=workspace_slug, project_id=project_id, work_item_id=work_item_id ) - diff --git a/plane_mcp/tools/modules.py b/plane_mcp/tools/modules.py index 04b2a4f..3ef3579 100644 --- a/plane_mcp/tools/modules.py +++ b/plane_mcp/tools/modules.py @@ -25,17 +25,7 @@ def list_modules( project_id: str, params: dict[str, Any] | None = None, ) -> list[Module]: - """ - List all modules in a project. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - params: Optional query parameters as a dictionary - - Returns: - List of Module objects - """ + """List all modules in a project.""" client, workspace_slug = get_plane_client_context() response: PaginatedModuleResponse = client.modules.list( workspace_slug=workspace_slug, project_id=project_id, params=params @@ -55,25 +45,7 @@ def create_module( external_source: str | None = None, external_id: str | None = None, ) -> Module: - """ - Create a new module. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - name: Module name - description: Module description - start_date: Module start date (ISO 8601 format) - target_date: Module target/end date (ISO 8601 format) - status: Module status (backlog, planned, in-progress, paused, completed, cancelled) - lead: UUID of the user who leads the module - members: List of user IDs who are members of the module - external_source: External system source name - external_id: External system identifier - - Returns: - Created Module object - """ + """Create a new module.""" client, workspace_slug = get_plane_client_context() data = CreateModule( @@ -94,17 +66,7 @@ def create_module( @mcp.tool() def retrieve_module(project_id: str, module_id: str) -> Module: - """ - Retrieve a module by ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - module_id: UUID of the module - - Returns: - Module object - """ + """Retrieve a module by ID.""" client, workspace_slug = get_plane_client_context() return client.modules.retrieve( workspace_slug=workspace_slug, project_id=project_id, module_id=module_id @@ -124,26 +86,7 @@ def update_module( external_source: str | None = None, external_id: str | None = None, ) -> Module: - """ - Update a module by ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - module_id: UUID of the module - name: Module name - description: Module description - start_date: Module start date (ISO 8601 format) - target_date: Module target/end date (ISO 8601 format) - status: Module status (backlog, planned, in-progress, paused, completed, cancelled) - lead: UUID of the user who leads the module - members: List of user IDs who are members of the module - external_source: External system source name - external_id: External system identifier - - Returns: - Updated Module object - """ + """Update a module by ID.""" client, workspace_slug = get_plane_client_context() data = UpdateModule( @@ -164,14 +107,7 @@ def update_module( @mcp.tool() def delete_module(project_id: str, module_id: str) -> None: - """ - Delete a module by ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - module_id: UUID of the module - """ + """Delete a module by ID.""" client, workspace_slug = get_plane_client_context() client.modules.delete( workspace_slug=workspace_slug, project_id=project_id, module_id=module_id @@ -182,17 +118,7 @@ def list_archived_modules( project_id: str, params: dict[str, Any] | None = None, ) -> list[Module]: - """ - List archived modules in a project. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - params: Optional query parameters as a dictionary - - Returns: - List of archived Module objects - """ + """List archived modules in a project.""" client, workspace_slug = get_plane_client_context() response: PaginatedArchivedModuleResponse = client.modules.list_archived( workspace_slug=workspace_slug, project_id=project_id, params=params @@ -205,15 +131,7 @@ def add_work_items_to_module( module_id: str, issue_ids: list[str], ) -> None: - """ - Add work items to a module. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - module_id: UUID of the module - issue_ids: List of work item IDs to add to the module - """ + """Add work items to a module.""" client, workspace_slug = get_plane_client_context() client.modules.add_work_items( workspace_slug=workspace_slug, @@ -228,15 +146,7 @@ def remove_work_item_from_module( module_id: str, work_item_id: str, ) -> None: - """ - Remove a work item from a module. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - module_id: UUID of the module - work_item_id: UUID of the work item to remove - """ + """Remove a work item from a module.""" client, workspace_slug = get_plane_client_context() client.modules.remove_work_item( workspace_slug=workspace_slug, @@ -251,18 +161,7 @@ def list_module_work_items( module_id: str, params: dict[str, Any] | None = None, ) -> list[WorkItem]: - """ - List work items in a module. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - module_id: UUID of the module - params: Optional query parameters as a dictionary - - Returns: - List of WorkItem objects in the module - """ + """List work items in a module.""" client, workspace_slug = get_plane_client_context() response: PaginatedModuleWorkItemResponse = client.modules.list_work_items( workspace_slug=workspace_slug, @@ -274,14 +173,7 @@ def list_module_work_items( @mcp.tool() def archive_module(project_id: str, module_id: str) -> None: - """ - Archive a module. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - module_id: UUID of the module - """ + """Archive a module.""" client, workspace_slug = get_plane_client_context() client.modules.archive( workspace_slug=workspace_slug, project_id=project_id, module_id=module_id @@ -289,14 +181,7 @@ def archive_module(project_id: str, module_id: str) -> None: @mcp.tool() def unarchive_module(project_id: str, module_id: str) -> None: - """ - Unarchive a module. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - module_id: UUID of the module - """ + """Unarchive a module.""" client, workspace_slug = get_plane_client_context() client.modules.unarchive( workspace_slug=workspace_slug, project_id=project_id, module_id=module_id diff --git a/plane_mcp/tools/projects.py b/plane_mcp/tools/projects.py index 2642960..35bdd5f 100644 --- a/plane_mcp/tools/projects.py +++ b/plane_mcp/tools/projects.py @@ -28,20 +28,7 @@ def list_projects( fields: str | None = None, order_by: str | None = None, ) -> list[Project]: - """ - List all projects in a workspace. - - Args: - workspace_slug: The workspace slug identifier - cursor: Pagination cursor for getting next set of results - per_page: Number of results per page (1-100) - expand: Comma-separated list of related fields to expand in response - fields: Comma-separated list of fields to include in response - order_by: Field to order results by. Prefix with '-' for descending order - - Returns: - List of Project objects - """ + """List all projects in a workspace.""" client, workspace_slug = get_plane_client_context() params = PaginatedQueryParams( @@ -81,34 +68,7 @@ def create_project( external_id: str | None = None, is_issue_type_enabled: bool | None = None, ) -> Project: - """ - Create a new project. - - Args: - workspace_slug: The workspace slug identifier - name: Project name - identifier: Project identifier (e.g., "MP" for "My Project") - description: Project description - project_lead: UUID of the project lead user - default_assignee: UUID of the default assignee user - emoji: Emoji for the project - cover_image: Cover image URL or asset ID - module_view: Enable module view - cycle_view: Enable cycle view - issue_views_view: Enable issue views view - page_view: Enable page view - intake_view: Enable intake view - guest_view_all_features: Allow guests to view all features - archive_in: Days until auto-archive - close_in: Days until auto-close - timezone: Project timezone - external_source: External system source name - external_id: External system identifier - is_issue_type_enabled: Enable issue types - - Returns: - Created Project object - """ + """Create a new project.""" client, workspace_slug = get_plane_client_context() data = CreateProject( @@ -137,16 +97,7 @@ def create_project( @mcp.tool() def retrieve_project(project_id: str) -> Project: - """ - Retrieve a project by ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - - Returns: - Project object - """ + """Retrieve a project by ID.""" client, workspace_slug = get_plane_client_context() return client.projects.retrieve(workspace_slug=workspace_slug, project_id=project_id) @@ -176,38 +127,7 @@ def update_project( default_state: str | None = None, estimate: str | None = None, ) -> Project: - """ - Update a project by ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - name: Project name - description: Project description - project_lead: UUID of the project lead user - default_assignee: UUID of the default assignee user - identifier: Project identifier - emoji: Emoji for the project - cover_image: Cover image URL or asset ID - module_view: Enable module view - cycle_view: Enable cycle view - issue_views_view: Enable issue views view - page_view: Enable page view - intake_view: Enable intake view - guest_view_all_features: Allow guests to view all features - archive_in: Days until auto-archive - close_in: Days until auto-close - timezone: Project timezone - external_source: External system source name - external_id: External system identifier - is_issue_type_enabled: Enable issue types - is_time_tracking_enabled: Enable time tracking - default_state: UUID of the default state - estimate: Estimate configuration - - Returns: - Updated Project object - """ + """Update a project by ID.""" client, workspace_slug = get_plane_client_context() data = UpdateProject( @@ -241,28 +161,13 @@ def update_project( @mcp.tool() def delete_project(project_id: str) -> None: - """ - Delete a project by ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - """ + """Delete a project by ID.""" client, workspace_slug = get_plane_client_context() client.projects.delete(workspace_slug=workspace_slug, project_id=project_id) @mcp.tool() def get_project_worklog_summary(project_id: str) -> list[ProjectWorklogSummary]: - """ - Get work log summary for a project. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - - Returns: - List of ProjectWorklogSummary objects containing work item IDs and durations - """ + """Get work log summary for a project.""" client, workspace_slug = get_plane_client_context() return client.projects.get_worklog_summary( workspace_slug=workspace_slug, project_id=project_id @@ -272,17 +177,7 @@ def get_project_worklog_summary(project_id: str) -> list[ProjectWorklogSummary]: def get_project_members( project_id: str, params: dict[str, Any] | None = None ) -> list[UserLite]: - """ - Get all members of a project. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - params: Optional query parameters as a dictionary - - Returns: - List of UserLite objects representing project members - """ + """Get all members of a project.""" client, workspace_slug = get_plane_client_context() return client.projects.get_members( workspace_slug=workspace_slug, project_id=project_id, params=params @@ -290,16 +185,7 @@ def get_project_members( @mcp.tool() def get_project_features(project_id: str) -> ProjectFeature: - """ - Get features of a project. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - - Returns: - ProjectFeature object containing enabled/disabled features - """ + """Get features of a project.""" client, workspace_slug = get_plane_client_context() return client.projects.get_features(workspace_slug=workspace_slug, project_id=project_id) @@ -314,23 +200,7 @@ def update_project_features( intakes: bool | None = None, work_item_types: bool | None = None, ) -> ProjectFeature: - """ - Update features of a project. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - epics: Enable/disable epics feature - modules: Enable/disable modules feature - cycles: Enable/disable cycles feature - views: Enable/disable views feature - pages: Enable/disable pages feature - intakes: Enable/disable intakes feature - work_item_types: Enable/disable work item types feature - - Returns: - Updated ProjectFeature object - """ + """Update features of a project.""" client, workspace_slug = get_plane_client_context() data = ProjectFeature( diff --git a/plane_mcp/tools/users.py b/plane_mcp/tools/users.py index 243936f..d6628fc 100644 --- a/plane_mcp/tools/users.py +++ b/plane_mcp/tools/users.py @@ -11,11 +11,6 @@ def register_user_tools(mcp: FastMCP) -> None: @mcp.tool() def get_me() -> UserLite: - """ - Get current user information. - - Returns: - UserLite object containing current user information - """ + """Get current user information.""" client, workspace_slug = get_plane_client_context() return client.users.get_me() diff --git a/plane_mcp/tools/work_item_properties.py b/plane_mcp/tools/work_item_properties.py index e3a4ab1..921e113 100644 --- a/plane_mcp/tools/work_item_properties.py +++ b/plane_mcp/tools/work_item_properties.py @@ -29,18 +29,7 @@ def list_work_item_properties( type_id: str, params: dict[str, Any] | None = None, ) -> list[WorkItemProperty]: - """ - List work item properties for a work item type. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - type_id: UUID of the work item type - params: Optional query parameters as a dictionary - - Returns: - List of WorkItemProperty objects - """ + """List work item properties for a work item type.""" client, workspace_slug = get_plane_client_context() return client.work_item_properties.list( workspace_slug=workspace_slug, @@ -67,32 +56,7 @@ def create_work_item_property( external_id: str | None = None, options: list[dict] | None = None, ) -> WorkItemProperty: - """ - Create a new work item property. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - type_id: UUID of the work item type - display_name: Display name for the property - property_type: Type of property (TEXT, DATETIME, DECIMAL, BOOLEAN, OPTION, RELATION, URL, EMAIL, FILE) - relation_type: Relation type (ISSUE, USER) - required for RELATION properties - description: Property description - is_required: Whether the property is required - default_value: Default value(s) for the property - settings: Settings dictionary - required for TEXT and DATETIME properties - For TEXT: {"display_format": "single-line"|"multi-line"|"readonly"} - For DATETIME: {"display_format": "MMM dd, yyyy"|"dd/MM/yyyy"|"MM/dd/yyyy"|"yyyy/MM/dd"} - is_active: Whether the property is active - is_multi: Whether the property supports multiple values - validation_rules: Validation rules dictionary - external_source: External system source name - external_id: External system identifier - options: List of option dictionaries for OPTION properties - - Returns: - Created WorkItemProperty object - """ + """Create a new work item property. Property types: TEXT, DATETIME, DECIMAL, BOOLEAN, OPTION, RELATION, URL, EMAIL, FILE.""" client, workspace_slug = get_plane_client_context() # Convert settings dict to appropriate settings object if needed @@ -134,18 +98,7 @@ def retrieve_work_item_property( type_id: str, work_item_property_id: str, ) -> WorkItemProperty: - """ - Retrieve a work item property by ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - type_id: UUID of the work item type - work_item_property_id: UUID of the property - - Returns: - WorkItemProperty object - """ + """Retrieve a work item property by ID.""" client, workspace_slug = get_plane_client_context() return client.work_item_properties.retrieve( workspace_slug=workspace_slug, @@ -172,32 +125,7 @@ def update_work_item_property( external_source: str | None = None, external_id: str | None = None, ) -> WorkItemProperty: - """ - Update a work item property by ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - type_id: UUID of the work item type - work_item_property_id: UUID of the property - display_name: Display name for the property - property_type: Type of property (TEXT, DATETIME, DECIMAL, BOOLEAN, OPTION, RELATION, URL, EMAIL, FILE) - relation_type: Relation type (ISSUE, USER) - required when updating to RELATION - description: Property description - is_required: Whether the property is required - default_value: Default value(s) for the property - settings: Settings dictionary - required when updating to TEXT or DATETIME - For TEXT: {"display_format": "single-line"|"multi-line"|"readonly"} - For DATETIME: {"display_format": "MMM dd, yyyy"|"dd/MM/yyyy"|"MM/dd/yyyy"|"yyyy/MM/dd"} - is_active: Whether the property is active - is_multi: Whether the property supports multiple values - validation_rules: Validation rules dictionary - external_source: External system source name - external_id: External system identifier - - Returns: - Updated WorkItemProperty object - """ + """Update a work item property by ID.""" client, workspace_slug = get_plane_client_context() # Convert settings dict to appropriate settings object if needed @@ -242,15 +170,7 @@ def delete_work_item_property( type_id: str, work_item_property_id: str, ) -> None: - """ - Delete a work item property by ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - type_id: UUID of the work item type - work_item_property_id: UUID of the property - """ + """Delete a work item property by ID.""" client, workspace_slug = get_plane_client_context() client.work_item_properties.delete( workspace_slug=workspace_slug, diff --git a/plane_mcp/tools/work_items.py b/plane_mcp/tools/work_items.py index eb95f0a..6f18b5c 100644 --- a/plane_mcp/tools/work_items.py +++ b/plane_mcp/tools/work_items.py @@ -29,23 +29,7 @@ def list_work_items( external_id: str | None = None, external_source: str | None = None, ) -> list[WorkItem]: - """ - List all work items in a project. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - cursor: Pagination cursor for getting next set of results - per_page: Number of results per page (1-100) - expand: Comma-separated list of related fields to expand in response - fields: Comma-separated list of fields to include in response - order_by: Field to order results by. Prefix with '-' for descending order - external_id: External system identifier for filtering or lookup - external_source: External system source name for filtering or lookup - - Returns: - List of WorkItem objects - """ + """List all work items in a project.""" client, workspace_slug = get_plane_client_context() params = WorkItemQueryParams( @@ -88,34 +72,7 @@ def create_work_item( estimate_point: str | None = None, type: str | None = None, ) -> WorkItem: - """ - Create a new work item. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - name: Work item name (required) - assignees: List of user IDs to assign to the work item - labels: List of label IDs to attach to the work item - type_id: UUID of the work item type - point: Story point value - description_html: HTML description of the work item - description_stripped: Plain text description (stripped of HTML) - priority: Priority level (urgent, high, medium, low, none) - start_date: Start date (ISO 8601 format) - target_date: Target/end date (ISO 8601 format) - sort_order: Sort order value - is_draft: Whether the work item is a draft - external_source: External system source name - external_id: External system identifier - parent: UUID of the parent work item - state: UUID of the state - estimate_point: Estimate point value - type: Work item type identifier - - Returns: - Created WorkItem object - """ + """Create a new work item.""" client, workspace_slug = get_plane_client_context() data = CreateWorkItem( @@ -153,22 +110,7 @@ def retrieve_work_item( external_source: str | None = None, order_by: str | None = None, ) -> WorkItemDetail: - """ - Retrieve a work item by ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - work_item_id: UUID of the work item - expand: Comma-separated fields to expand (e.g., "assignees,labels,state") - fields: Comma-separated fields to include in response - external_id: External system identifier for filtering - external_source: External system source name for filtering - order_by: Field to order results by (typically not used for single item retrieval) - - Returns: - WorkItemDetail object with expanded relationships - """ + """Retrieve a work item by ID.""" client, workspace_slug = get_plane_client_context() params = RetrieveQueryParams( @@ -196,22 +138,7 @@ def retrieve_work_item_by_identifier( external_source: str | None = None, order_by: str | None = None, ) -> WorkItemDetail: - """ - Retrieve a work item by project identifier and issue sequence number. - - Args: - workspace_slug: The workspace slug identifier - project_identifier: Project identifier string (e.g., "MP" for "My Project") - issue_identifier: Issue sequence number (e.g., 1, 2, 3) - expand: Comma-separated fields to expand (e.g., "assignees,labels,state") - fields: Comma-separated list of fields to include in response - external_id: External system identifier for filtering - external_source: External system source name for filtering - order_by: Field to order results by (typically not used for single item retrieval) - - Returns: - WorkItemDetail object with expanded relationships - """ + """Retrieve a work item by project identifier and issue sequence number (e.g., MP-123).""" client, workspace_slug = get_plane_client_context() params = RetrieveQueryParams( @@ -252,35 +179,7 @@ def update_work_item( estimate_point: str | None = None, type: str | None = None, ) -> WorkItem: - """ - Update a work item by ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - work_item_id: UUID of the work item - name: Work item name - assignees: List of user IDs to assign to the work item - labels: List of label IDs to attach to the work item - type_id: UUID of the work item type - point: Story point value - description_html: HTML description of the work item - description_stripped: Plain text description (stripped of HTML) - priority: Priority level (urgent, high, medium, low, none) - start_date: Start date (ISO 8601 format) - target_date: Target/end date (ISO 8601 format) - sort_order: Sort order value - is_draft: Whether the work item is a draft - external_source: External system source name - external_id: External system identifier - parent: UUID of the parent work item - state: UUID of the state - estimate_point: Estimate point value - type: Work item type identifier - - Returns: - Updated WorkItem object - """ + """Update a work item by ID.""" client, workspace_slug = get_plane_client_context() data = UpdateWorkItem( @@ -313,14 +212,7 @@ def update_work_item( @mcp.tool() def delete_work_item(project_id: str, work_item_id: str) -> None: - """ - Delete a work item by ID. - - Args: - workspace_slug: The workspace slug identifier - project_id: UUID of the project - work_item_id: UUID of the work item - """ + """Delete a work item by ID.""" client, workspace_slug = get_plane_client_context() client.work_items.delete( workspace_slug=workspace_slug, project_id=project_id, work_item_id=work_item_id @@ -335,22 +227,7 @@ def search_work_items( external_source: str | None = None, order_by: str | None = None, ) -> WorkItemSearch: - """ - Search work items across a workspace. - - Args: - workspace_slug: The workspace slug identifier - query: This is a free-form text search and will be used to search the work items - by name, description etc. - expand: Comma-separated list of related fields to expand in response - fields: Comma-separated list of fields to include in response - external_id: External system identifier for filtering - external_source: External system source name for filtering - order_by: Field to order results by. Prefix with '-' for descending order - - Returns: - WorkItemSearch object containing search results - """ + """Search work items across a workspace by name, description, etc.""" client, workspace_slug = get_plane_client_context() params = RetrieveQueryParams(