Skip to main content
Glama
packetracer

Palo Alto Networks MCP Server Suite

by packetracer

list_resources

Retrieve specific Palo Alto Networks firewall resources by category and type to manage security policies, network objects, devices, and system configurations.

Instructions

List resources from a specific category

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYesResource category to list
resource_typeYesSpecific resource type within the category

Implementation Reference

  • Executes the list_resources tool: validates args using isListResourcesArgs, checks resource_type in category's list from RESOURCE_CATEGORIES, performs API GET to `/Objects/${resource_type}`, returns JSON stringified response as text content.
    case 'list_resources': { const rawArgs = request.params.arguments; if (!isListResourcesArgs(rawArgs)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid arguments for list_resources' ); } const { category, resource_type } = rawArgs; const categoryResources = RESOURCE_CATEGORIES[category]; if (!categoryResources.includes(resource_type)) { throw new McpError( ErrorCode.InvalidParams, `Invalid resource type for category ${category}: ${resource_type}` ); } const response = await this.axiosInstance.get(`/Objects/${resource_type}`); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; }
  • TypeScript interface and runtime validator function for list_resources input arguments (category and resource_type).
    interface ListResourcesArgs { category: keyof ResourceCategories; resource_type: string; } function isListResourcesArgs(args: unknown): args is ListResourcesArgs { if (typeof args !== 'object' || args === null) return false; const typedArgs = args as Record<string, unknown>; return ( typeof typedArgs.category === 'string' && typeof typedArgs.resource_type === 'string' && Object.keys(RESOURCE_CATEGORIES).includes(typedArgs.category as string) ); }
  • src/index.ts:141-158 (registration)
    Tool registration in the ListTools response, including name, description, and JSON inputSchema matching the TS types.
    name: 'list_resources', description: 'List resources from a specific category', inputSchema: { type: 'object', properties: { category: { type: 'string', enum: Object.keys(RESOURCE_CATEGORIES), description: 'Resource category to list' }, resource_type: { type: 'string', description: 'Specific resource type within the category' } }, required: ['category', 'resource_type'] } },
  • Constant defining all resource categories and their valid resource_types, used for schema enum, input validation, and runtime checks in the handler.
    const RESOURCE_CATEGORIES: ResourceCategories = { OBJECTS: [ 'Addresses', 'AddressGroups', 'Regions', 'DynamicUserGroups', 'Applications', 'ApplicationGroups', 'ApplicationFilters', 'Services', 'ServiceGroups', 'Tags', 'GlobalProtectHIPObjects', 'GlobalProtectHIPProfiles', 'ExternalDynamicLists', 'CustomDataPatterns', 'CustomSpywareSignatures', 'CustomVulnerabilitySignatures', 'CustomURLCategories', 'AntivirusSecurityProfiles', 'AntiSpywareSecurityProfiles', 'VulnerabilityProtectionSecurityProfiles', 'URLFilteringSecurityProfiles', 'FileBlockingSecurityProfiles', 'WildFireAnalysisSecurityProfiles', 'DataFilteringSecurityProfiles', 'DoSProtectionSecurityProfiles', 'SecurityProfileGroups', 'LogForwardingProfiles', 'AuthenticationEnforcements', 'DecryptionProfiles', 'PacketBrokerProfiles', 'SDWANPathQualityProfiles', 'SDWANTrafficDistributionProfiles', 'SDWANSaasQualityProfiles', 'SDWANErrorCorrection', 'Schedules' ], POLICIES: [ 'SecurityRules', 'NATRules', 'QoSRules', 'PolicyBasedForwardingRules', 'DecryptionRules', 'NetworkPacketBrokerRules', 'TunnelInspectionRules', 'ApplicationOverrideRules', 'AuthenticationRules', 'DoSRules', 'SDWANRules' ], NETWORK: [ 'EthernetInterfaces', 'AggregateEthernetInterfaces', 'VLANInterfaces', 'LoopbackInterfaces', 'TunnelIntefaces', 'SDWANInterfaces', 'Zones', 'VLANs', 'VirtualWires', 'VirtualRouters', 'IPSecTunnels', 'GRETunnels', 'DHCPServers', 'DHCPRelays', 'DNSProxies', 'GlobalProtectPortals', 'GlobalProtectGateways', 'GlobalProtectGatewayAgentTunnels', 'GlobalProtectGatewaySatelliteTunnels', 'GlobalProtectGatewayMDMServers', 'GlobalProtectClientlessApps', 'GlobalProtectClientlessAppGroups', 'QoSInterfaces', 'LLDP', 'GlobalProtectIPSecCryptoNetworkProfiles', 'IKEGatewayNetworkProfiles', 'IKECryptoNetworkProfiles', 'MonitorNetworkProfiles', 'InterfaceManagementNetworkProfiles', 'ZoneProtectionNetworkProfiles', 'QoSNetworkProfiles', 'LLDPNetworkProfiles', 'BFDNetworkProfiles', 'SDWANInterfaceProfiles' ], DEVICES: [ 'VirtualSystems', 'SNMPTrapServerProfiles', 'SyslogServerProfiles', 'EmailServerProfiles', 'HttpServerProfiles', 'LDAPServerProfiles' ] };

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/packetracer/mcpserver'

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