Skip to main content
Glama
pingidentity

PingOne Advanced Identity Cloud MCP Server

Official
by pingidentity

Get Log Sources

getLogSources
Read-only

Retrieve available log sources from PingOne Advanced Identity Cloud to identify data origins for log analysis.

Instructions

Retrieve the list of available log sources in PingOne AIC

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool definition and handler function for 'getLogSources'. It makes an authenticated GET request to the AIC monitoring logs sources endpoint and returns the list of available log sources.
    export const getLogSourcesTool = {
      name: 'getLogSources',
      title: 'Get Log Sources',
      description: 'Retrieve the list of available log sources in PingOne AIC',
      scopes: SCOPES,
      annotations: {
        readOnlyHint: true,
        openWorldHint: true
      },
      async toolFunction() {
        const url = `https://${aicBaseUrl}/monitoring/logs/sources`;
    
        try {
          const { data, response } = await makeAuthenticatedRequest(url, SCOPES);
          return createToolResponse(formatSuccess(data, response));
        } catch (error: any) {
          return createToolResponse(`Failed to fetch log sources: ${error.message}`);
        }
      }
    };
  • src/index.ts:27-44 (registration)
    Registration of all tools (including getLogSources) via server.registerTool(). The tool is collected by getAllTools() via the logTools barrel export.
    allTools.forEach((tool) => {
      const toolConfig: ToolConfig = {
        title: tool.title,
        description: tool.description
      };
    
      // Only add inputSchema if it exists (some tools like getLogSources don't have one)
      if ('inputSchema' in tool && tool.inputSchema) {
        toolConfig.inputSchema = tool.inputSchema;
      }
    
      // Add annotations if present
      if ('annotations' in tool && tool.annotations) {
        toolConfig.annotations = tool.annotations;
      }
    
      server.registerTool(tool.name, toolConfig, tool.toolFunction as any);
    });
  • getAllTools() collects all tools from all categories including logTools (which contains getLogSourcesTool). This utility feeds the registration loop.
    export function getAllTools(): Tool[] {
      const isDockerMode = process.env.DOCKER_CONTAINER === 'true';
    
      const tools: Tool[] = [
        ...(Object.values(managedObjectTools) as Tool[]),
        ...(Object.values(logTools) as Tool[]),
        ...(Object.values(themeTools) as Tool[]),
        ...(Object.values(esvTools) as Tool[]),
        ...(Object.values(featureManagementTools) as Tool[])
      ];
    
      // Only include AM tools in non-Docker mode (requires browser-based PKCE auth)
      if (!isDockerMode) {
        tools.push(...(Object.values(amTools) as Tool[]));
        tools.push(...(Object.values(applicationTools) as Tool[]));
      }
    
      return tools;
    }
  • Barrel export that re-exports getLogSourcesTool from the getLogSources module, making it discoverable by getAllTools().
    export { getLogSourcesTool } from './getLogSources.js';
    export { queryLogsTool } from './queryLogs.js';
  • Reference to getLogSources in the queryLogs tool's input schema description, guiding users to use getLogSources to discover available sources.
    sources: z
      .array(z.string())
      .describe(
        "Log sources to query (e.g., ['am-authentication', 'idm-activity']). IMPORTANT: use the getLogSources tool to determine available sources."
      ),
Behavior2/5

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

Annotations already provide readOnlyHint and openWorldHint. The description adds no behavioral details beyond the obvious retrieve operation, failing to specify ordering, filtering, or output characteristics. With annotations present, the bar is lowered, but the description offers minimal additional transparency.

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 sentence with no fluff, perfectly front-loading the essential information.

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

Completeness3/5

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

Given no parameters and no output schema, the description covers the basic purpose but lacks details on the output format (e.g., what fields are returned). It is sufficient for a simple list but not fully comprehensive.

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 input schema has zero parameters, so the baseline is 4. The description does not need to add parameter information, and it does not.

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 'Retrieve the list of available log sources in PingOne AIC' uses a specific verb and resource, clearly stating the tool's function and distinguishing it from sibling tools that deal with other entities like journeys or OIDC apps.

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

Usage Guidelines3/5

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

The description implies usage context—if you need log sources, use this tool—but provides no explicit guidance on when to use it versus alternatives like queryLogs, nor does it mention any exclusions or prerequisites.

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/pingidentity/aic-mcp-server'

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