Skip to main content
Glama

Relationship

relationship
Read-onlyIdempotent

"How is [CWE-A] related to [CWE-B]" / "relationship between two weaknesses", fetch the directional relationship (parent/child/peer/precedes/can-precede) between two specific CWE IDs. Specialty tool; most queries are better served by children / parents / descendants.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "source_id": "79",
      "target_id": "352"
    },
    "name": "relationship"
  }
}

Input Schema

NameRequiredDescriptionDefault
source_idYes
target_idYes

Output Schema

NameRequiredDescriptionDefault
view_idsNoCWE view ids in which a direct parent/child link between the two was found
source_idNoSource CWE identifier
target_idNoTarget CWE identifier
descriptionNoRelationship description
relation_typeNoType of relationship

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / view_ids
      Added value: +{
      +  "description": "CWE view ids in which a direct parent/child link between the two was found",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "source_id": "79",
      +    "target_id": "352"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "Relationship details between two CWEs",
      +  "properties": {
      +    "description": {
      +      "description": "Relationship description",
      +      "type": "string"
      +    },
      +    "relation_type": {
      +      "description": "Type of relationship",
      +      "type": "string"
      +    },
      +    "source_id": {
      +      "description": "Source CWE identifier",
      +      "type": "string"
      +    },
      +    "target_id": {
      +      "description": "Target CWE identifier",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds genuinely new behavioral context by stating the result is directional and constrained to a fixed set of relation types. It does not say what happens when no relationship exists (empty result vs. error), which is the main remaining gap.

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

Conciseness4/5

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

The useful content is front-loaded in the first clause, and the sibling redirect comes last where it belongs. The two near-duplicate example phrasings at the start ('How is [CWE-A] related to [CWE-B]' and 'relationship between two weaknesses') are slightly redundant but cost little.

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

Completeness5/5

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

With rich annotations and an output schema present, the definition need only cover selection, directionality and relation semantics, and it does all three. Nothing essential for calling a two-parameter lookup correctly is missing, apart from the minor unanswered question of no-result behavior.

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 0%, so the description must compensate, and it partly does: 'between two specific CWE IDs' tells the agent both parameters are CWE identifiers and that the pair is ordered/directional. However, it never maps source_id vs. target_id to the direction (e.g., is source the parent?), leaving the directionality of the two named parameters ambiguous.

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 gives a specific verb (fetch) and resource (directional relationship between two CWE IDs) and enumerates the possible relation types (parent/child/peer/precedes/can-precede). It also distinguishes itself from the children/parents/descendants siblings, so an agent can identify the tool without opening the schema.

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

Usage Guidelines5/5

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

It provides both a positive usage pattern ('How is [CWE-A] related to [CWE-B]') and an explicit exclusion: 'Specialty tool; most queries are better served by children / parents / descendants.' That names the alternatives and the condition under which they win, which is exactly the routing information an agent needs.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.