Skip to main content
Glama
ajragusa

perfsonar-mcp

by ajragusa

schedule_latency_test

Schedule network latency tests between hosts using pScheduler to measure packet transit times and identify performance issues.

Instructions

Schedule a latency test using pScheduler.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNoSource host (optional)
destYesDestination host
packetCountNoNumber of packets
packetIntervalNoInterval between packets

Implementation Reference

  • The actual implementation of scheduling a latency test in the PSchedulerClient class.
    async def schedule_latency_test(
        self,
        source: Optional[str],
        dest: str,
        packet_count: int = 600,
        packet_interval: float = 0.1,
        slip: str = "PT10M",
    ) -> PSchedulerTaskResponse:
        """
        Schedule a latency (one-way delay) test
    
        Args:
            source: Source host (None for local)
            dest: Destination host
            packet_count: Number of packets to send
            packet_interval: Interval between packets in seconds
            slip: Schedule slip time in ISO 8601 format (e.g., PT10M for 10 minutes)
    
        Returns:
            Task response
        """
        logger.info(
            f"Scheduling latency test from {source or 'local'} to {dest} ({packet_count} packets)"
        )
    
        # Determine which node to schedule on (prefer source if available)
        scheduler_node = source or dest
        scheduler_url = f"https://{scheduler_node}/pscheduler"
        logger.info(f"Using pScheduler at: {scheduler_url}")
    
        test_spec = LatencyTestSpec(
            source=source, dest=dest, packet_count=packet_count, packet_interval=packet_interval
        )
    
        task_request = PSchedulerTaskRequest(
            test=PSchedulerTestSpec(
                type="latency", spec=test_spec.model_dump(by_alias=True, exclude_none=True)
            ),
            schedule={"slip": slip},
        )
    
        # Create a temporary client for this specific scheduler
        client = PSchedulerClient(scheduler_url)
        try:
            return await client.create_task(task_request)
        finally:
            await client.close()
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 tool schedules a test but doesn't explain what happens after scheduling (e.g., whether it returns a test ID, triggers immediate execution, or requires follow-up with 'get_test_status'). It also omits details like authentication needs, rate limits, or potential side effects, which are critical for a scheduling operation.

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 with zero waste—it directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy for an agent 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 of scheduling a network test (which likely involves asynchronous operations and follow-up tools), the description is incomplete. No annotations exist to clarify behavior, and there's no output schema to explain return values. The description fails to address key aspects like what the tool returns (e.g., a test ID), how to monitor test progress, or dependencies on other tools in the sibling list.

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?

Schema description coverage is 100%, meaning all parameters are documented in the input schema. The description adds no additional parameter information beyond what's in the schema (e.g., units for 'packetInterval', format for 'source'/'dest', or typical values). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.

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 action ('Schedule a latency test') and the system used ('using pScheduler'), which is a specific verb+resource combination. However, it doesn't distinguish this tool from its sibling 'schedule_rtt_test' or 'schedule_throughput_test', which likely have similar scheduling functions but for different test types.

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 like 'schedule_rtt_test' or 'schedule_throughput_test'. It also doesn't mention prerequisites, context, or exclusions for scheduling latency tests, leaving the agent with no usage direction beyond the basic purpose.

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/ajragusa/perfsonar-mcp'

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