Skip to main content
Glama

Submit a lesson

submit_lesson

GitRanks Learn: submits the lesson on your fix that a Learn claim's lessonBrief describes (3 to 5 steps of typed blocks, one question each with its key). Use it once the claim's patch passed its checks; a new patch needs a new lesson. Our checks and a short review run at once. On a pass it answers reviewUrl: the contributor takes the lesson on gitranks.com and only then approves the pull request. On a fail it answers the findings, one per line, and callsLeft: fix the lesson and submit again; the fifth failed call on the same patch ends the claim. courseLesson: answer it only when the lessonBrief lists the issue's lessons. Send the slug of the lesson the change used, or null for none. If the lessonBrief lists no lessons, leave it out.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "attemptId": "<attemptId>",
      "lesson": "<lesson>"
    },
    "name": "submit_lesson"
  }
}

Input Schema

NameRequiredDescriptionDefault
lessonYesThe lesson on your fix, in the shape the claim's lessonBrief gives
attemptIdYesThe attemptId of your claim or follow-up (24 hex characters), as its start or the contributions list answered it
courseLessonNoAnswer it only when the lessonBrief lists the issue's lessons: the slug of the one lesson your change used, or null when it used none. If the lessonBrief lists no lessons, leave it out

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / lesson / properties / steps / items / properties / blocks / items / oneOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "text": {
      -        "maxLength": 1200,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "text",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "text"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "caption": {
      -        "maxLength": 200,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "edges": {
      -        "items": {
      -          "properties": {
      -            "from": {
      -              "pattern": "^[a-z0-9][a-z0-9_-]{0,39}$",
      -              "type": "string"
      -            },
      -            "to": {
      -              "pattern": "^[a-z0-9][a-z0-9_-]{0,39}$",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "from",
      -            "to"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 20,
      -        "type": "array"
      -      },
      -      "nodes": {
      -        "items": {
      -          "properties": {
      -            "id": {
      -              "pattern": "^[a-z0-9][a-z0-9_-]{0,39}$",
      -              "type": "string"
      -            },
      -            "label": {
      -              "maxLength": 60,
      -              "minLength": 1,
      -              "type": "string"
      -            },
      -            "mono": {
      -              "type": "boolean"
      -            },
      -            "sub": {
      -              "maxLength": 60,
      -              "type": "string"
      -            },
      -            "tone": {
      -              "enum": [
      -                "plain",
      -                "accent",
      -                "warn"
      -              ],
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "label",
      -            "tone"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 16,
      -        "type": "array"
      -      },
      -      "type": {
      -        "const": "diagram",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "nodes",
      -      "edges",
      -      "caption"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "file": {
      -        "maxLength": 500,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "header": {
      -        "description": "the hunk header, @@ -a,b +c,d @@",
      -        "maxLength": 200,
      -        "type": "string"
      -      },
      -      "lines": {
      -        "description": "the hunk's lines as the patch has them",
      -        "items": {
      -          "maxLength": 400,
      -          "type": "string"
      -        },
      -        "maxItems": 200,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "mark": {
      -        "description": "indexes into lines to ring",
      -        "items": {
      -          "maximum": 9007199254740991,
      -          "minimum": 0,
      -          "type": "integer"
      -        },
      -        "maxItems": 200,
      -        "type": "array"
      -      },
      -      "type": {
      -        "const": "diff",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "file",
      -      "header",
      -      "lines"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "commit": {
      -        "description": "base.commit",
      -        "maxLength": 40,
      -        "type": "string"
      -      },
      -      "excerpt": {
      -        "maxLength": 16000,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "lines": {
      -        "description": "[first, last] line, 1-based",
      -        "items": {
      -          "maximum": 9007199254740991,
      -          "minimum": -9007199254740991,
      -          "type": "integer"
      -        },
      -        "maxItems": 2,
      -        "minItems": 2,
      -        "type": "array"
      -      },
      -      "path": {
      -        "maxLength": 500,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "repo": {
      -        "description": "owner/name",
      -        "maxLength": 200,
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "code",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "repo",
      -      "commit",
      -      "path",
      -      "lines",
      -      "excerpt"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "text": {
      +        "maxLength": 1200,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "text",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "text"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "caption": {
      +        "maxLength": 200,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "edges": {
      +        "items": {
      +          "properties": {
      +            "from": {
      +              "pattern": "^[a-z0-9][a-z0-9_-]{0,39}$",
      +              "type": "string"
      +            },
      +            "label": {
      +              "description": "A few words on the arrow; every call of a sequence needs one",
      +              "maxLength": 40,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "reply": {
      +              "description": "sequence only: a dashed arrow back",
      +              "type": "boolean"
      +            },
      +            "to": {
      +              "pattern": "^[a-z0-9][a-z0-9_-]{0,39}$",
      +              "type": "string"
      +            },
      +            "tone": {
      +              "description": "plain when absent; accent: the call or link the fix changed; warn: the one that broke",
      +              "enum": [
      +                "plain",
      +                "accent",
      +                "warn"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "from",
      +            "to"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 20,
      +        "type": "array"
      +      },
      +      "layout": {
      +        "description": "flow (default): boxes and arrows laid out by GitRanks. sequence: 2 to 4 actors left to right, the edges are the calls in order",
      +        "enum": [
      +          "flow",
      +          "sequence"
      +        ],
      +        "type": "string"
      +      },
      +      "nodes": {
      +        "items": {
      +          "properties": {
      +            "id": {
      +              "pattern": "^[a-z0-9][a-z0-9_-]{0,39}$",
      +              "type": "string"
      +            },
      +            "label": {
      +              "maxLength": 60,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "mono": {
      +              "type": "boolean"
      +            },
      +            "sub": {
      +              "maxLength": 60,
      +              "type": "string"
      +            },
      +            "tone": {
      +              "enum": [
      +                "plain",
      +                "accent",
      +                "warn"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "id",
      +            "label",
      +            "tone"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 16,
      +        "type": "array"
      +      },
      +      "type": {
      +        "const": "diagram",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "nodes",
      +      "edges",
      +      "caption"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "file": {
      +        "maxLength": 500,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "header": {
      +        "description": "the hunk header, @@ -a,b +c,d @@",
      +        "maxLength": 200,
      +        "type": "string"
      +      },
      +      "lines": {
      +        "description": "the hunk's lines as the patch has them",
      +        "items": {
      +          "maxLength": 400,
      +          "type": "string"
      +        },
      +        "maxItems": 200,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "mark": {
      +        "description": "indexes into lines to ring",
      +        "items": {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "maxItems": 200,
      +        "type": "array"
      +      },
      +      "type": {
      +        "const": "diff",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "file",
      +      "header",
      +      "lines"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "commit": {
      +        "description": "base.commit",
      +        "maxLength": 40,
      +        "type": "string"
      +      },
      +      "excerpt": {
      +        "maxLength": 16000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "lines": {
      +        "description": "[first, last] line, 1-based",
      +        "items": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "maxItems": 2,
      +        "minItems": 2,
      +        "type": "array"
      +      },
      +      "path": {
      +        "maxLength": 500,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "repo": {
      +        "description": "owner/name",
      +        "maxLength": 200,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "code",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "repo",
      +      "commit",
      +      "path",
      +      "lines",
      +      "excerpt"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "after": {
      +        "properties": {
      +          "edges": {
      +            "items": {
      +              "properties": {
      +                "from": {
      +                  "pattern": "^[a-z0-9][a-z0-9_-]{0,39}$",
      +                  "type": "string"
      +                },
      +                "label": {
      +                  "description": "A few words on the arrow; every call of a sequence needs one",
      +                  "maxLength": 40,
      +                  "minLength": 1,
      +                  "type": "string"
      +                },
      +                "reply": {
      +                  "description": "sequence only: a dashed arrow back",
      +                  "type": "boolean"
      +                },
      +                "to": {
      +                  "pattern": "^[a-z0-9][a-z0-9_-]{0,39}$",
      +                  "type": "string"
      +                },
      +                "tone": {
      +                  "description": "plain when absent; accent: the call or link the fix changed; warn: the one that broke",
      +                  "enum": [
      +                    "plain",
      +                    "accent",
      +                    "warn"
      +                  ],
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "from",
      +                "to"
      +              ],
      +              "type": "object"
      +            },
      +            "maxItems": 20,
      +            "type": "array"
      +          },
      +          "excerpt": {
      +            "maxLength": 16000,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "lines": {
      +            "description": "[first, last] line, 1-based",
      +            "items": {
      +              "maximum": 9007199254740991,
      +              "minimum": -9007199254740991,
      +              "type": "integer"
      +            },
      +            "maxItems": 2,
      +            "minItems": 2,
      +            "type": "array"
      +          },
      +          "nodes": {
      +            "items": {
      +              "properties": {
      +                "id": {
      +                  "pattern": "^[a-z0-9][a-z0-9_-]{0,39}$",
      +                  "type": "string"
      +                },
      +                "label": {
      +                  "maxLength": 60,
      +                  "minLength": 1,
      +                  "type": "string"
      +                },
      +                "mono": {
      +                  "type": "boolean"
      +                },
      +                "sub": {
      +                  "maxLength": 60,
      +                  "type": "string"
      +                },
      +                "tone": {
      +                  "enum": [
      +                    "plain",
      +                    "accent",
      +                    "warn"
      +                  ],
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "id",
      +                "label",
      +                "tone"
      +              ],
      +              "type": "object"
      +            },
      +            "maxItems": 16,
      +            "type": "array"
      +          },
      +          "path": {
      +            "maxLength": 500,
      +            "minLength": 1,
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "before": {
      +        "properties": {
      +          "edges": {
      +            "items": {
      +              "properties": {
      +                "from": {
      +                  "pattern": "^[a-z0-9][a-z0-9_-]{0,39}$",
      +                  "type": "string"
      +                },
      +                "label": {
      +                  "description": "A few words on the arrow; every call of a sequence needs one",
      +                  "maxLength": 40,
      +                  "minLength": 1,
      +                  "type": "string"
      +                },
      +                "reply": {
      +                  "description": "sequence only: a dashed arrow back",
      +                  "type": "boolean"
      +                },
      +                "to": {
      +                  "pattern": "^[a-z0-9][a-z0-9_-]{0,39}$",
      +                  "type": "string"
      +                },
      +                "tone": {
      +                  "description": "plain when absent; accent: the call or link the fix changed; warn: the one that broke",
      +                  "enum": [
      +                    "plain",
      +                    "accent",
      +                    "warn"
      +                  ],
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "from",
      +                "to"
      +              ],
      +              "type": "object"
      +            },
      +            "maxItems": 20,
      +            "type": "array"
      +          },
      +          "excerpt": {
      +            "maxLength": 16000,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "lines": {
      +            "description": "[first, last] line, 1-based",
      +            "items": {
      +              "maximum": 9007199254740991,
      +              "minimum": -9007199254740991,
      +              "type": "integer"
      +            },
      +            "maxItems": 2,
      +            "minItems": 2,
      +            "type": "array"
      +          },
      +          "nodes": {
      +            "items": {
      +              "properties": {
      +                "id": {
      +                  "pattern": "^[a-z0-9][a-z0-9_-]{0,39}$",
      +                  "type": "string"
      +                },
      +                "label": {
      +                  "maxLength": 60,
      +                  "minLength": 1,
      +                  "type": "string"
      +                },
      +                "mono": {
      +                  "type": "boolean"
      +                },
      +                "sub": {
      +                  "maxLength": 60,
      +                  "type": "string"
      +                },
      +                "tone": {
      +                  "enum": [
      +                    "plain",
      +                    "accent",
      +                    "warn"
      +                  ],
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "id",
      +                "label",
      +                "tone"
      +              ],
      +              "type": "object"
      +            },
      +            "maxItems": 16,
      +            "type": "array"
      +          },
      +          "path": {
      +            "maxLength": 500,
      +            "minLength": 1,
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "caption": {
      +        "maxLength": 200,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "commit": {
      +        "description": "base.commit, for code",
      +        "maxLength": 40,
      +        "type": "string"
      +      },
      +      "of": {
      +        "description": "diagram: two small flow diagrams (nodes, edges). code: two excerpts (path, lines, excerpt), before at base.commit, after as your commit leaves the file",
      +        "enum": [
      +          "diagram",
      +          "code"
      +        ],
      +        "type": "string"
      +      },
      +      "repo": {
      +        "description": "owner/name, for code",
      +        "maxLength": 200,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "compare",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "of",
      +      "before",
      +      "after",
      +      "caption"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "caption": {
      +        "maxLength": 200,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "columns": {
      +        "items": {
      +          "maxLength": 24,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 6,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "ring": {
      +        "description": "the index of the one row the step is about",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "rows": {
      +        "description": "one cell per column; plain text with `code` spans",
      +        "items": {
      +          "items": {
      +            "maxLength": 80,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "maxItems": 6,
      +          "type": "array"
      +        },
      +        "maxItems": 10,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "type": {
      +        "const": "table",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "columns",
      +      "rows",
      +      "caption"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed1 schema field changed
    • addedInput schema / properties / courseLesson
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 120,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Answer it only when the lessonBrief lists the issue's lessons: the slug of the one lesson your change used, or null when it used none. If the lessonBrief lists no lessons, leave it out"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Well beyond the annotations: it discloses that checks and a short review run concurrently, what a pass returns (reviewUrl and the contributor approval flow), what a fail returns (findings one per line plus callsLeft), and the hard cap of five failed calls per patch. The only reason this is not a 5 is that it never confirms idempotency or what happens to a previously accepted lesson when resubmitted on the same patch.

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?

Dense but front-loaded: purpose first, then the precondition, then the two response branches, then the conditional field. Every sentence carries an operational fact, with only mild overlap between the closing courseLesson sentence and the schema's own description of that field.

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?

No output schema exists, and the description compensates fully by naming the return keys for each branch (reviewUrl, findings, callsLeft) and describing the downstream approval flow. Given three parameters, deep nesting, and prose-only documentation of the lesson payload's semantics, nothing essential for a correct call is missing.

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?

Schema coverage is 100%, so the baseline is 3; the description earns above that by narrowing the schema's permissive bounds with a real content constraint (3 to 5 steps, one question per step with its key) that an agent could not derive from minItems/maxItems of 1–8 and 1–30. It also explains the courseLesson null-vs-omitted distinction, though that largely restates the schema text.

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?

States a specific verb and resource — submits the lesson on your fix that a Learn claim's lessonBrief describes — and scopes the payload shape (3 to 5 steps of typed blocks, one question each with its key). The word 'lesson' plus the lessonBrief reference separates it cleanly from sibling submissions like submit_patch and submit_proof.

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?

Gives an explicit gate ('use it once the claim's patch passed its checks; a new patch needs a new lesson'), an explicit retry rule ('fix the lesson and submit again; the fifth failed call on the same patch ends the claim'), and an explicit conditional for courseLesson (answer only when the lessonBrief lists lessons). When-to-use, when-to-omit, and failure handling are all covered.

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.