Skip to main content
Glama
jakedx6

Helios-9 MCP Server

by jakedx6

disassociate_document_from_initiative

Remove a document from an initiative to manage project resources and maintain accurate documentation links within Helios-9 project management.

Instructions

Remove the link between a document and an initiative

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
initiative_idYesThe initiative ID to disassociate the document from
document_idYesThe document ID to disassociate from the initiative

Implementation Reference

  • The primary handler function that executes the disassociate_document_from_initiative tool logic. It validates the initiative_id and document_id using Zod, logs the action, calls the Supabase service method to perform the disassociation, logs success, and returns a structured success response.
    export const disassociateDocumentFromInitiative = requireAuth(async (args: any) => {
      const { initiative_id, document_id } = z.object({
        initiative_id: z.string().uuid(),
        document_id: z.string().uuid()
      }).parse(args)
      
      logger.info('Disassociating document from initiative', { initiative_id, document_id })
      
      // Call the API to remove the association
      const response = await supabaseService.disassociateDocumentFromInitiative(initiative_id, document_id)
      
      logger.info('Document disassociated from initiative successfully')
      
      return {
        success: true,
        message: `Document successfully disassociated from initiative`,
        initiative_id,
        document_id
      }
    })
  • The MCPTool object definition providing the tool name, description, and input schema (JSON Schema) for validation of initiative_id and document_id parameters.
    export const disassociateDocumentFromInitiativeTool: MCPTool = {
      name: 'disassociate_document_from_initiative',
      description: 'Remove the link between a document and an initiative',
      inputSchema: {
        type: 'object',
        properties: {
          initiative_id: {
            type: 'string',
            format: 'uuid',
            description: 'The initiative ID to disassociate the document from'
          },
          document_id: {
            type: 'string',
            format: 'uuid',
            description: 'The document ID to disassociate from the initiative'
          }
        },
        required: ['initiative_id', 'document_id']
      }
    }
  • Local registry mapping tool names to their handler functions, including disassociate_document_from_initiative mapped to its handler.
    export const initiativeHandlers = {
      list_initiatives: listInitiatives,
      get_initiative: getInitiative,
      create_initiative: createInitiative,
      update_initiative: updateInitiative,
      get_initiative_context: getInitiativeContext,
      get_initiative_insights: getInitiativeInsights,
      search_workspace: searchWorkspace,
      get_enhanced_project_context: getEnhancedProjectContext,
      get_workspace_context: getWorkspaceContext,
      associate_document_with_initiative: associateDocumentWithInitiative,
      disassociate_document_from_initiative: disassociateDocumentFromInitiative
    }
  • src/index.ts:143-155 (registration)
    Global MCP server handler registry where initiativeHandlers (containing disassociate_document_from_initiative) is spread into the master allHandlers object used for tool execution.
    this.allHandlers = {
      ...projectHandlers,
      ...taskHandlers,
      ...documentHandlers,
      ...conversationHandlers,
      ...contextAggregationHandlers,
      ...workflowAutomationHandlers,
      ...intelligentSearchHandlers,
      ...analyticsInsightsHandlers,
      ...initiativeHandlers,
      ...promptToProjectTools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.handler }), {}),
      ...debugHandlers,
    }
  • Supporting API client method invoked by the tool handler to send a DELETE request to the backend API endpoint for disassociating a document from an initiative.
    async disassociateDocumentFromInitiative(initiativeId: string, documentId: string): Promise<any> {
      const response = await this.request<{ success: boolean }>(`/api/mcp/initiatives/${initiativeId}/documents/${documentId}`, {
        method: 'DELETE',
      })
      
      logger.info(`Document ${documentId} disassociated from initiative ${initiativeId}`)
      return response
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jakedx6/helios9-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server