Skip to main content
Glama

FindRelationships

Discover and analyze connections between data points in RushDB's graph database to understand complex relationships and dependencies.

Instructions

Find relationships in the database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
whereNoSearch conditions for finding relationships
limitNoMaximum number of relationships to return
skipNoNumber of relationships to skip
orderByNoSorting configuration: key = field, value = asc|desc

Implementation Reference

  • The core handler function that implements the FindRelationships tool, querying the database for relationships based on provided filters.
    export async function FindRelationships(params: { where?: Record<string, any> limit?: number skip?: number orderBy?: Record<string, 'asc' | 'desc'> }) { const { where, limit = 10, skip = 0, orderBy } = params const searchQuery: any = { limit, skip } if (where) searchQuery.where = where if (orderBy && Object.keys(orderBy).length > 0) searchQuery.orderBy = orderBy const result = await db.relationships.find(searchQuery) if (result.success && result.data) return result.data return [] }
  • Defines the input schema, description, and metadata for the FindRelationships tool used in tool listing.
    { name: 'FindRelationships', description: 'Find relationships in the database', inputSchema: { type: 'object', properties: { where: { type: 'object', description: 'Search conditions for finding relationships' }, limit: { type: 'number', description: 'Maximum number of relationships to return', default: 10 }, skip: { type: 'number', description: 'Number of relationships to skip', default: 0 }, orderBy: { type: 'object', description: 'Sorting configuration: key = field, value = asc|desc', additionalProperties: { type: 'string', enum: ['asc', 'desc'] } } }, required: [] } },
  • index.ts:257-271 (registration)
    Registers the FindRelationships tool in the MCP server's CallToolRequestSchema handler by dispatching to the handler function.
    case 'FindRelationships': const relations = await FindRelationships({ where: args.where as Record<string, any> | undefined, limit: args.limit as number | undefined, skip: args.skip as number | undefined, orderBy: args.orderBy as Record<string, 'asc' | 'desc'> | undefined }) return { content: [ { type: 'text', text: relations.length > 0 ? JSON.stringify(relations, null, 2) : 'No relations found' } ] }

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/1pxone/RushDB'

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