Skip to main content
Glama
javerthl

ServiceNow MCP Server

by javerthl

list_tool_packages

List available tool packages and identify the currently loaded package in the ServiceNow MCP Server to manage ServiceNow API operations.

Instructions

Lists available tool packages and the currently loaded one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
random_stringYesDummy parameter for no-parameter tools

Implementation Reference

  • The core handler function that implements the logic for the 'list_tool_packages' tool, returning information about the current and available tool packages.
    def _list_tool_packages_impl(self) -> Dict[str, Any]:
        """Implementation logic for the list_tool_packages tool."""
        available_packages = list(self.package_definitions.keys())
        return {
            "current_package": self.current_package_name,
            "available_packages": available_packages,
            "message": (
                f"Currently loaded package: '{self.current_package_name}'. "
                f"Set MCP_TOOL_PACKAGE env var to one of {available_packages} to switch."
            ),
        }
  • Registers the 'list_tool_packages' tool in the _list_tools_impl method, including its name, description, and input schema (dummy param for no-arg tool).
    if self.current_package_name != "none":
        tool_list.append(
            types.Tool(
                name="list_tool_packages",
                description="Lists available tool packages and the currently loaded one.",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "random_string": {
                            "type": "string",
                            "description": "Dummy parameter for no-parameter tools",
                        }
                    },
                    "required": ["random_string"],
                },
            )
        )
  • Special dispatch handler in _call_tool_impl for 'list_tool_packages', checks package, calls impl, serializes, and returns TextContent.
    if name == "list_tool_packages":
        if self.current_package_name == "none":
            raise ValueError(
                "Tool 'list_tool_packages' is not available in the 'none' package."
            )
        result_dict = self._list_tool_packages_impl()
        serialized_string = json.dumps(result_dict, indent=2)
        # Return a list with a TextContent object
        return [types.TextContent(type="text", text=serialized_string)]
  • The input schema definition for the 'list_tool_packages' tool, using a dummy required string parameter since it's a no-arg tool.
    inputSchema={
        "type": "object",
        "properties": {
            "random_string": {
                "type": "string",
                "description": "Dummy parameter for no-parameter tools",
            }
        },
        "required": ["random_string"],
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe how it behaves: no information on output format (e.g., list structure, pagination), permissions required, rate limits, or whether it's a read-only operation. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded with the core action ('Lists') and resources, making it easy to parse. Every part of the sentence earns its place by specifying both available and currently loaded packages.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool that likely returns structured data about tool packages. It doesn't explain what information is included in the listing (e.g., package names, versions, status) or how to interpret the output. For a list operation with no structured support, more context is needed to guide the agent effectively.

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

Parameters3/5

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

The input schema has 100% description coverage, with one parameter clearly documented as a 'Dummy parameter for no-parameter tools.' The description adds no additional parameter information beyond what the schema provides. According to the rules, when schema_description_coverage is high (>80%), the baseline score is 3 even with no param info in the description.

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

Purpose4/5

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

The description clearly states the tool's purpose with the verb 'Lists' and specifies the resources 'available tool packages and the currently loaded one.' It distinguishes itself from sibling tools by focusing on tool packages rather than articles, users, workflows, etc. However, it doesn't explicitly differentiate from hypothetical similar tools like 'list_tools' or 'get_tool_package_details' that might exist elsewhere.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, timing considerations, or how it relates to other tools in the sibling list (e.g., whether it should be used before activating workflows or creating script includes). The agent must infer usage from the tool name alone.

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

Install Server

Other Tools

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/javerthl/servicenow-mcp'

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