MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / tool_definitions

Method tool_definitions

atomic-repository/src/ai/tools.rs:704–840  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

702
703impl<'a> ToolExecutor for RepoToolExecutor<'a> {
704 fn tool_definitions(&self) -> Vec<ToolDefinition> {
705 #[allow(unused_mut)]
706 let mut defs = vec![
707 ToolDefinition {
708 name: "kg_search".into(),
709 description: "Search the repository knowledge graph for nodes matching a \
710 query. Returns files, functions, changes, views, goals, intents. \
711 VCS nodes and source content are filtered to the current view; \
712 vault-only nodes are shared."
713 .into(),
714 parameters: json!({
715 "type": "object",
716 "properties": {
717 "query": {
718 "type": "string",
719 "description": "Free-text search query"
720 },
721 "limit": {
722 "type": "integer",
723 "description": "Maximum results to return (default 10)"
724 }
725 },
726 "required": ["query"]
727 }),
728 },
729 ToolDefinition {
730 name: "kg_neighbors".into(),
731 description: "Explore the knowledge-graph neighborhood around a node. \
732 Returns connected nodes and edges."
733 .into(),
734 parameters: json!({
735 "type": "object",
736 "properties": {
737 "node_id": {
738 "type": "string",
739 "description": "Canonical resource IRI copied from a search result; files are project-qualified and changes use their full content hash"
740 },
741 "depth": {
742 "type": "integer",
743 "description": "Traversal depth (default 1, max 2)"
744 }
745 },
746 "required": ["node_id"]
747 }),
748 },
749 ToolDefinition {
750 name: "read_file".into(),
751 description: "Read a file from the working copy. For files over 8KB, \
752 returns a 50-line preview unless you specify start_line/end_line. \
753 Always use list_entities or code_search first to find the \
754 right line range instead of reading entire large files."
755 .into(),
756 parameters: json!({
757 "type": "object",
758 "properties": {
759 "path": {
760 "type": "string",
761 "description": "Relative path from repository root"

Callers 2

run_tool_loopFunction · 0.80
test_echo_executorFunction · 0.80

Calls 1

pushMethod · 0.45

Tested by 1

test_echo_executorFunction · 0.64