Obtain a service access token scoped to https://purl.imsglobal.org/spec/lti-ags/scope/lineitem and https://purl.imsglobal.org/spec/lti-ags/scope/score by POSTing a signed JWT client assertion to the platform's token endpoint.
To create a new line item, POST to the lineitems endpoint URL (from the launch JWT claim or stored deployment config) with a JSON body containing label, scoreMaximum, resourceId, and tag fields; the platform returns the created line item including its id URL.
To post a score for a specific student, POST to <lineitem_id>/scores with Content-Type: application/vnd.ims.lis.v1.score+json; the body must include userId (student sub), scoreGiven, scoreMaximum, activityProgress, gradingProgress, and timestamp.
Set activityProgress to 'Completed' and gradingProgress to 'FullyGraded' to signal a final grade; use 'PendingManual' when the score requires instructor review.
To read back scores, GET <lineitem_id>/results with the scope https://purl.imsglobal.org/spec/lti-ags/scope/result.readonly; results are paginated using Link headers.
When the platform pre-creates a line item (resourceLinkId bound), retrieve it via GET /lineitems?resource_link_id=<resourceLinkId> rather than creating a duplicate.
Known gotchas
Posting a score with a timestamp earlier than an existing score for the same user/lineItem may be silently ignored or rejected by some platforms; always use current UTC as the timestamp.
The scope required to create line items (lti-ags/scope/lineitem) is different from the scope to post scores (lti-ags/scope/score); some platforms grant both together, others require separate token requests.
Platforms vary in whether they expose a single lineitems URL per context or per resource link; read the AGS claim from each launch JWT rather than hardcoding a URL per deployment.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp