Skip to main content
Glama
JackXuyi

Current operating environment

getInstalledApps

Retrieve a list of applications installed on your current device to audit software inventory or identify available tools.

Instructions

获取当前设备已安装的应用信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler case for the 'getInstalledApps' tool within the switch statement in handleCallToolRequest. It detects the OS platform and uses appropriate system commands (system_profiler on macOS, dpkg/rpm on Linux, PowerShell WMI on Windows) to list installed applications and returns them as a JSON array.
    case "getInstalledApps": {
      let installedApps: string[] = [];
      try {
        if (os.platform() === 'darwin') {
          // macOS 使用 system_profiler 命令获取已安装的应用
          const apps = execSync('system_profiler SPApplicationsDataType -json').toString();
          installedApps = JSON.parse(apps).SPApplicationsDataType.map((app: any) => app._name);
        } else if (os.platform() === 'linux') {
          // Linux 使用 dpkg 或 rpm 命令获取已安装的软件包
          try {
            installedApps = execSync('dpkg --list | grep ^ii').toString().split('\n').map(line => line.split(/\s+/)[1]);
          } catch (error) {
            installedApps = execSync('rpm -qa').toString().split('\n');
          }
        } else if (os.platform() === 'win32') {
          // Windows 使用 Get-WmiObject 命令获取已安装的应用
          const apps = execSync('powershell -Command "Get-WmiObject -Class Win32_Product | Select-Object -Property Name"').toString();
          installedApps = apps.split('\n').filter(line => line.trim()).slice(1);
        }
      } catch (error) {
        console.error("获取已安装应用信息失败:", error);
      }
    
      return {
        content: [{
          type: "text",
          text: JSON.stringify({ installedApps }, null, 2)
        }]
      };
  • src/index.ts:145-153 (registration)
    The tool registration in the list of tools returned by handleRequest function, including name, description, and empty inputSchema.
    {
      name: "getInstalledApps",
      description: "获取当前设备已安装的应用信息",
      inputSchema: {
        type: "object",
        properties: {},
        required: []
      }
    },
  • The input schema for the getInstalledApps tool, which takes no parameters (empty object).
    inputSchema: {
      type: "object",
      properties: {},
      required: []
    }
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 the action ('获取') but doesn't add context like whether this is a read-only operation, if it requires permissions, what format the information is returned in, or any rate limits. This is a significant gap for a tool with no annotation coverage.

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 in Chinese that directly states the tool's purpose without any unnecessary words or fluff. It is appropriately sized and front-loaded, making it easy to parse quickly.

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 complexity (a read operation with no parameters) and the lack of annotations and output schema, the description is incomplete. It doesn't explain what '应用信息' includes (e.g., names, versions, paths) or the return format, leaving the agent with insufficient context to use the tool effectively.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately doesn't mention any, earning a baseline high score for this dimension.

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 verb '获取' (get/retrieve) and the resource '当前设备已安装的应用信息' (currently installed application information on the device), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'getAppSchemas' or 'getProcesses', which might also relate to applications, so it doesn't reach the highest score.

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 any context, prerequisites, or exclusions, such as whether it's for system-wide apps only or includes user-installed ones, leaving the agent to infer usage based on the 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/JackXuyi/env-mcp'

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