Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`tj context`: attribute MCP schema-injection tokens as a named overhead category

Open
#328 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
cli, observability

Research direction

Start with tokenjam/core/context_diagnostic.py and read the MCP_INJECTION_PARK_NOTE and mcp_injection_parked handling. First determine how a real per-request tool-schema token delta could be captured; the issue says this data is not currently available in transcripts or live OTLP spans. Done means tj context reports MCP-injection tokens as a distinct overhead category using captured data, not estimates.

Written by the indexing model from the issue text.

Description

bug good first issue help wanted

Severity: Low
Where: tokenjam sub-repo — tokenjam/core/context_diagnostic.py
Observed: tj context breaks token usage into named "overhead" categories (for example the existing cache_miss category). MCP schema-injection — the tool/schema definitions Claude Code injects into each request, on the order of ~25K tokens per call — is a known overhead source that is currently NOT surfaced as its own category, because per-tool/per-schema token attribution is not available in either the on-disk Claude Code transcript or the live OTLP spans. Tool-definition/system-prompt tokens fold indistinguishably into input_tokens/cache_creation; mcp__-prefixed names appear only on tool-invocation spans, which carry no schema-injection token count. The honest gap is documented in code as the MCP_INJECTION_PARK_NOTE constant plus a mcp_injection_parked JSON field.
Fix direction: Once a per-request tool-schema token delta can be captured (e.g. the system-prompt/tool-definition token count Claude Code sends per request, or a with-vs-without-MCP token diff), surface MCP schema-injection as its own named overhead category, mirroring the existing cache_miss category. Blocked on capturing that data first.
Done when: tj context breaks out MCP-injection tokens as a distinct named overhead source (no invented numbers — only once the data is real).

Dominant language
Python
Stars
122
Forks
35
Avg merge
1d 18h
Merged PRs (30d)
8

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Metabuilder-Labs/tokenjam

All issues in Metabuilder-Labs/tokenjam

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.