atlas-mcp-server
Version:
ATLAS (Adaptive Task & Logic Automation System): An MCP server enabling LLM agents to manage projects, tasks, and knowledge via a Neo4j-backed, three-tier architecture. Facilitates complex workflow automation and project management through LLM Agents.
78 lines (77 loc) • 3.01 kB
TypeScript
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;
/**
* Escapes a relationship type string for safe use in Cypher queries.
* It wraps the type in backticks and escapes any existing backticks within the type string.
* @param type The relationship type string to escape.
* @returns The escaped relationship type string.
*/
export declare const escapeRelationshipType: (type: string) => 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 {};