Skip to main content
Glama
ibm-ecm

Core Content Services MCP Server

Official
by ibm-ecm

lookup_documents_by_path

Find documents based on their position in a folder hierarchy by providing keywords for each path level. Returns matching document filings.

Instructions

PREREQUISITE: To use this tool, you MUST call the determine_class tool first to get the class_symbolic_name. If the user does not specify a specific clas then call determine_class with the root Document class.

:param keywords_at_path_levels: A list of lists of keywords to search for at each path level. The first dimension list is the number of path levels entered by the user. For each path level a sub list contains up to 3 words from the user's message for that level that might contain either the intermediate folder name or the actual document's containment name. Avoid using very common words such as "and", "or", "the", etc. for these keywords. Note that the matching of documents by path is based on the containment names of the documents filed in the folder, not the name of the documents themselves. The containment names of documents are usually the same or similar to the documents but they can be different in some scenarios. :param class_symbolic_name: If specified, a specific document class to look in for matching documents. The root Document class is used by default. Specify a class only if the user indicates that the documents should belong to a specific class.

:returns: A list of matching document filings, or a ToolError if no matches are found or if there is some other problem. Each match is a DocumentMatch object with information about the document filing including its name.

Description: This tool will execute a search to lookup documents based on where they are filed in a folder hierarchy. One indication that a lookup by path is appropriate rather than a more basic lookup by name is if the user has used a path separator character ('/') to describe the document. A list of the most likely documents matching the keywords is returned. Use this list to select the appropriate document based on the user's message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywords_at_path_levelsYes
class_symbolic_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv1.0.4
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / class_symbolic_name / title
      Removed value: -"Class Symbolic Name"
    • removedInput schema / properties / keywords_at_path_levels / title
      Removed value: -"Keywords At Path Levels"
    • removedInput schema / title
      Removed value: -"lookup_documents_by_pathArguments"
    • removedOutput schema / $defs
      Removed value: -{
      -  "DocumentFilingMatch": {
      -    "description": "Information about a document where it is filed in a folder that matches a search.",
      -    "properties": {
      -      "containment_id": {
      -        "description": "The id of the containment relationship where the document is filed",
      -        "title": "Containment Id",
      -        "type": "string"
      -      },
      -      "containment_name": {
      -        "description": "The containment name of the document where filed in the folder",
      -        "title": "Containment Name",
      -        "type": "string"
      -      },
      -      "containment_path": {
      -        "description": "The containment path of the document where filed in the folder",
      -        "title": "Containment Path",
      -        "type": "string"
      -      },
      -      "document_class_name": {
      -        "default": "Document",
      -        "description": "Class identifier for the document that is filed",
      -        "title": "Document Class Name",
      -        "type": "string"
      -      },
      -      "document_id": {
      -        "description": "The id of the document that is filed in the folder",
      -        "title": "Document Id",
      -        "type": "string"
      -      },
      -      "document_name": {
      -        "description": "The name of the document that is filed in the folder",
      -        "title": "Document Name",
      -        "type": "string"
      -      },
      -      "folder_id": {
      -        "description": "The id of the folder where the document is filed",
      -        "title": "Folder Id",
      -        "type": "string"
      -      },
      -      "folder_name": {
      -        "description": "The name of the folder where the document is filed",
      -        "title": "Folder Name",
      -        "type": "string"
      -      },
      -      "folder_path": {
      -        "description": "The path of the folder where the document is filed",
      -        "title": "Folder Path",
      -        "type": "string"
      -      },
      -      "score": {
      -        "description": "The match score, higher values indicate better matches",
      -        "title": "Score",
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "containment_id",
      -      "containment_name",
      -      "containment_path",
      -      "document_id",
      -      "document_name",
      -      "folder_id",
      -      "folder_name",
      -      "folder_path",
      -      "score"
      -    ],
      -    "title": "DocumentFilingMatch",
      -    "type": "object"
      -  },
      -  "ToolError": {
      -    "description": "Represents an error response from a tool execution.\n\nThis class helps the LLM understand error messages and provides suggestions\nfor potential resolutions.",
      -    "properties": {
      -      "isError": {
      -        "const": true,
      -        "default": true,
      -        "description": "Indicates that an error occurred during tool execution if value is True",
      -        "title": "Iserror",
      -        "type": "boolean"
      -      },
      -      "message": {
      -        "description": "Detailed error message",
      -        "title": "Message",
      -        "type": "string"
      -      },
      -      "suggestions": {
      -        "description": "List of suggestions for resolving the error",
      -        "items": {
      -          "type": "string"
      -        },
      -        "title": "Suggestions",
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "message"
      -    ],
      -    "title": "ToolError",
      -    "type": "object"
      -  }
      -}
    • changedOutput schema / properties / result / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "$ref": "#/$defs/DocumentFilingMatch"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "$ref": "#/$defs/ToolError"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "description": "Information about a document where it is filed in a folder that matches a search.",
      +      "properties": {
      +        "containment_id": {
      +          "description": "The id of the containment relationship where the document is filed",
      +          "type": "string"
      +        },
      +        "containment_name": {
      +          "description": "The containment name of the document where filed in the folder",
      +          "type": "string"
      +        },
      +        "containment_path": {
      +          "description": "The containment path of the document where filed in the folder",
      +          "type": "string"
      +        },
      +        "document_class_name": {
      +          "default": "Document",
      +          "description": "Class identifier for the document that is filed",
      +          "type": "string"
      +        },
      +        "document_id": {
      +          "description": "The id of the document that is filed in the folder",
      +          "type": "string"
      +        },
      +        "document_name": {
      +          "description": "The name of the document that is filed in the folder",
      +          "type": "string"
      +        },
      +        "folder_id": {
      +          "description": "The id of the folder where the document is filed",
      +          "type": "string"
      +        },
      +        "folder_name": {
      +          "description": "The name of the folder where the document is filed",
      +          "type": "string"
      +        },
      +        "folder_path": {
      +          "description": "The path of the folder where the document is filed",
      +          "type": "string"
      +        },
      +        "score": {
      +          "description": "The match score, higher values indicate better matches",
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "containment_id",
      +        "containment_name",
      +        "containment_path",
      +        "document_id",
      +        "document_name",
      +        "folder_id",
      +        "folder_name",
      +        "folder_path",
      +        "score"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "description": "Represents an error response from a tool execution.\n\nThis class helps the LLM understand error messages and provides suggestions\nfor potential resolutions.",
      +    "properties": {
      +      "isError": {
      +        "const": true,
      +        "default": true,
      +        "description": "Indicates that an error occurred during tool execution if value is True",
      +        "type": "boolean"
      +      },
      +      "message": {
      +        "description": "Detailed error message",
      +        "type": "string"
      +      },
      +      "suggestions": {
      +        "description": "List of suggestions for resolving the error",
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "message"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"lookup_documents_by_pathOutput"
    • addedOutput schema / x-fastmcp-wrap-result
      Added value: +true
  2. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description bears full burden. It explains matching is based on containment names, returns a list of DocumentMatch objects or ToolError, and details parameter semantics. Covers all relevant behavioral aspects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is verbose and contains redundant sections (docstring-style followed by separate 'Description:' line). Could be more streamlined. Front-loading is decent with prerequisite in bold, but overall structure is cluttered.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (two parameters, no annotations, output schema exists), the description sufficiently covers usage and behavior. Lacks details on error types beyond ToolError, but overall complete for agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage, but description compensates fully. Explains keywords_at_path_levels as list of lists with constraints (up to 3 words per level, avoid common words) and class_symbolic_name as optional with default root class. Adds meaning beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches for documents based on their folder path. It distinguishes from sibling lookup_documents_by_name by mentioning path separator usage and 'rather than a more basic lookup by name'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly requires calling determine_class first as a prerequisite. Provides guidance on when to use this tool (path separator) and how to construct the keywords parameter. No exclusions, but clear context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.