noodlbox

Graph Schema

Complete reference for noodlbox graph structure

Complete reference for all node types, relationships, and properties in the noodlbox knowledge graph.

Node Types

CodeSymbol

Represents code symbols: functions, classes, methods, variables, etc.

PropertyTypeDescription
idSERIALUnique identifier
nameSTRINGSymbol name
symbol_typeSTRINGType of symbol
file_pathSTRINGFile location
line_numberINT64Starting line
end_lineINT64Ending line (optional)
signatureSTRINGFunction signature (optional)

Symbol Types:

  • Function
  • Class
  • Method
  • Variable
  • Constant
  • Interface
  • Type
  • Enum

File

Source files in the repository.

PropertyTypeDescription
idSERIALUnique identifier
pathSTRINGRelative path from repo root
extensionSTRINGFile extension
languageSTRINGProgramming language (optional)

Community

Functional groupings detected by modularity analysis.

PropertyTypeDescription
idSERIALUnique identifier
labelSTRINGHuman-readable name
cohesionDOUBLECohesion score (0-1)
symbol_countINT64Number of symbols

Process

Execution flows through the codebase.

PropertyTypeDescription
idSERIALUnique identifier
labelSTRINGProcess name
process_typeSTRINGintra_community or cross_community
step_countINT64Number of steps

Repository

Repository metadata.

PropertyTypeDescription
idSERIALUnique identifier
nameSTRINGRepository name
full_nameSTRINGFull name (owner/repo)

Relationship Types

CALLS

Function/method call relationships.

Direction: (caller:CodeSymbol)-[:CALLS]->(callee:CodeSymbol)

PropertyTypeDescription
call_countINT64Number of calls (optional)

Example:

MATCH (a:CodeSymbol)-[:CALLS]->(b:CodeSymbol)
WHERE a.name = "handleRequest"
RETURN b.name

CONTAINED_BY

Symbols contained in files.

Direction: (symbol:CodeSymbol)-[:CONTAINED_BY]->(file:File)

Example:

MATCH (s:CodeSymbol)-[:CONTAINED_BY]->(f:File)
WHERE f.path = "src/index.ts"
RETURN s.name

MEMBER_OF

Symbols belonging to communities.

Direction: (symbol:CodeSymbol)-[:MEMBER_OF]->(community:Community)

PropertyTypeDescription
centralityDOUBLEImportance in community (optional)

Example:

MATCH (s:CodeSymbol)-[:MEMBER_OF]->(c:Community)
WHERE c.label = "Authentication"
RETURN s.name

STEP_IN_PROCESS

Steps in execution processes.

Direction: (symbol:CodeSymbol)-[:STEP_IN_PROCESS]->(process:Process)

PropertyTypeDescription
stepINT64Step number in sequence

Example:

MATCH (s:CodeSymbol)-[r:STEP_IN_PROCESS]->(p:Process)
WHERE p.label = "UserLogin"
RETURN s.name, r.step
ORDER BY r.step

BELONGS_TO

Files belonging to repositories.

Direction: (file:File)-[:BELONGS_TO]->(repo:Repository)

Example:

MATCH (f:File)-[:BELONGS_TO]->(r:Repository)
WHERE r.name = "my-app"
RETURN f.path

Property Types

TypeDescriptionExample
STRINGText data"functionName"
INT64Integer42
DOUBLEFloating point0.85
BOOLEANTrue/falsetrue
SERIALAuto-incrementing ID1

Indexes

The following properties are indexed for fast lookups:

  • CodeSymbol.name
  • CodeSymbol.file_path
  • File.path
  • Community.label
  • Process.label
  • Repository.name

Schema Queries

Get All Node Types

CALL db.nodeLabels()

Get All Relationship Types

CALL db.relationshipTypes()

Count Nodes by Type

MATCH (n)
RETURN labels(n)[0] as type, count(*) as count

Count Relationships by Type

MATCH ()-[r]->()
RETURN type(r) as type, count(*) as count

Accessing Schema via MCP

Use the Database Schema resource:

GET db://schema/{repository}

Returns complete schema including all properties.

On this page