Skip to main content
Glama
jakedx6
by jakedx6

disassociate_document_from_initiative

Remove a document from an initiative in Helios-9 project management to maintain accurate resource organization and project clarity.

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 main handler function that executes the MCP tool logic. Validates input parameters using Zod, logs the action, calls the supabaseService helper to perform the disassociation, logs success, and returns a structured 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 } })
  • Defines the MCPTool metadata including the tool name, description, and JSON inputSchema 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'] } }
  • Maps the tool name 'disassociate_document_from_initiative' to its handler function as part of the initiativeHandlers export used for tool registration.
    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 }
  • Supporting API client method (supabaseService.disassociateDocumentFromInitiative) called by the handler. Performs the actual HTTP DELETE request to the backend API to remove the document-initiative association.
    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