UNPKG

@mseep/atlas-mcp-server

Version:

A Model Context Protocol (MCP) server for ATLAS, a Neo4j-powered task management system for LLM Agents - implementing a three-tier architecture (Projects, Tasks, Knowledge) to manage complex workflows.

71 lines (70 loc) 2.67 kB
import { NodeLabels } from './types.js'; /** * Helper functions for the Neo4j service */ /** * Generate a unique ID string * @returns A unique string ID (without hyphens) */ export declare function generateId(): string; /** * Generate a timestamped ID with an optional prefix * @param prefix Optional prefix for the ID * @returns A unique ID with timestamp and random component */ export declare function generateTimestampedId(prefix?: string): string; /** * Build a Neo4j update query dynamically based on provided fields * @param nodeLabel Neo4j node label * @param identifier Node identifier in the query (e.g., 'n') * @param updates Updates to apply * @returns Object with setClauses and params */ export declare function buildUpdateQuery(nodeLabel: string, // Keep nodeLabel for potential future use or context identifier: string, updates: Record<string, any>): { setClauses: string[]; params: Record<string, any>; }; /** * Interface for filter options used in buildListQuery */ interface ListQueryFilterOptions { projectId?: string; status?: string | string[]; priority?: string | string[]; assignedTo?: string; taskType?: string; tags?: string[]; domain?: string; search?: string; } /** * Interface for pagination and sorting options used in buildListQuery */ interface ListQueryPaginationOptions { sortBy?: string; sortDirection?: 'asc' | 'desc'; page?: number; limit?: number; } /** * Interface for the result of buildListQuery */ interface ListQueryResult { countQuery: string; dataQuery: string; params: Record<string, any>; } /** * Builds dynamic Cypher queries for listing entities with filtering, sorting, and pagination. * * @param label The primary node label (e.g., NodeLabels.Task, NodeLabels.Knowledge) * @param returnProperties An array of properties or expressions to return for the data query (e.g., ['t.id as id', 'u.name as userName']) * @param filters Filter options based on ListQueryFilterOptions * @param pagination Pagination and sorting options based on ListQueryPaginationOptions * @param nodeAlias Alias for the primary node in the query (default: 'n') * @param additionalMatchClauses Optional string containing additional MATCH or OPTIONAL MATCH clauses (e.g., for relationships like assigned user or domain) * @returns ListQueryResult containing the count query, data query, and parameters */ export declare function buildListQuery(label: NodeLabels, returnProperties: string[], filters: ListQueryFilterOptions, pagination: ListQueryPaginationOptions, nodeAlias?: string, additionalMatchClauses?: string): ListQueryResult; export {};