lailaelkoussy commited on
Commit
0b87d9a
·
1 Parent(s): 578a211

update docstrings

Browse files
Files changed (1) hide show
  1. gradio_mcp_space.py +6 -6
gradio_mcp_space.py CHANGED
@@ -417,9 +417,9 @@ def list_nodes_by_type(node_type: str, limit: int = 20, page: int = 1) -> str:
417
  @observe(as_type="tool")
418
  def get_neighbors(node_id: str, limit: int = 20, page: int = 1) -> str:
419
  """
420
- Get all nodes directly connected to a given node.
421
 
422
- Shows neighboring nodes with their relationship types.
423
 
424
  Args:
425
  node_id: The ID of the node whose neighbors to retrieve
@@ -1011,11 +1011,11 @@ def entity_relationships(node_id: str) -> str:
1011
 
1012
 
1013
  @observe(as_type="tool")
1014
- def search_by_type_and_name(node_type: str, name_query: str, limit: int = 10, page: int = 1, fuzzy: bool = True) -> str:
1015
  """
1016
- Search for nodes/entities by type and name substring with fuzzy matching support.
1017
 
1018
- Filters nodes by type and searches for matching names. Supports partial/fuzzy matching
1019
  so searching for 'Embedding' will find 'BertEmbeddings', 'LlamaRotaryEmbedding', etc.
1020
 
1021
  For entities, searches by entity_type (e.g., 'class', 'function', 'method').
@@ -1025,7 +1025,7 @@ def search_by_type_and_name(node_type: str, name_query: str, limit: int = 10, pa
1025
  node_type: Type of node/entity (e.g., 'function', 'class', 'file', 'chunk', 'directory')
1026
  name_query: Substring to match in the name (case-insensitive, supports partial matches)
1027
  limit: Maximum results to return (default: 10)
1028
- fuzzy: Enable fuzzy/partial matching (default: True). If False, requires exact substring match.
1029
 
1030
  Returns:
1031
  str: A formatted string with matching nodes
 
417
  @observe(as_type="tool")
418
  def get_neighbors(node_id: str, limit: int = 20, page: int = 1) -> str:
419
  """
420
+ Retrieves all nodes directly connected to a given node.
421
 
422
+ Retrieves neighboring nodes with their relationship types.
423
 
424
  Args:
425
  node_id: The ID of the node whose neighbors to retrieve
 
1011
 
1012
 
1013
  @observe(as_type="tool")
1014
+ def search_by_type_and_name(node_type: str, name_query: str, limit: int = 10, page: int = 1, partial_allowed: bool = True) -> str:
1015
  """
1016
+ Search for nodes/entities by type and name substring with partial matching support.
1017
 
1018
+ Filters nodes by type and searches for matching names. Supports partial matching
1019
  so searching for 'Embedding' will find 'BertEmbeddings', 'LlamaRotaryEmbedding', etc.
1020
 
1021
  For entities, searches by entity_type (e.g., 'class', 'function', 'method').
 
1025
  node_type: Type of node/entity (e.g., 'function', 'class', 'file', 'chunk', 'directory')
1026
  name_query: Substring to match in the name (case-insensitive, supports partial matches)
1027
  limit: Maximum results to return (default: 10)
1028
+ partial_allowed: Enable partial matching (default: True). If False, requires exact substring match.
1029
 
1030
  Returns:
1031
  str: A formatted string with matching nodes