plan_lineup
Your lineup and line chances
Plans a doubles and singles lineup for a team the Desk covers. It lists who has played most for your team this season, with their appearances, usual line and Desk level, the Desk's estimate of how they play now. Against a covered opponent it adds each line's win chance, each team's Desk level there and the expected number of lines won. Call it for 'what lineup should we play against X', 'who has played most for us' or 'how do we beat X'. Pass `unavailable` for your players who are out, but pass `lineup` only for the players the person put on each line. Needs a Desk Pass after the member's free forecast each week. Past that, a call gets the free part, with no chance for anything still to be played, and `deskPass`, whose `message` you give the person. Its error is free_forecast_used, or desk_pass_required for a key with no member.
輸入參數team必填askedlineupseasonopponentunavailable
query_team_record
A team's results and next matches
Returns the recorded lines of any team the Desk covers, in any league and season, each with an evidenceId you can cite. It also gives the team's record, which is already counted, every team match of the period and its next matches. Call it when someone asks about a named team's matches, results or next match, or before you state a fact about them.
輸入參數dateteam必填askedlimitphaseseasonincludeAllSeasons
query_matchup
Recent results between two teams
Returns the recorded lines from the scorecards where two named teams played each other, in any season, each with an evidenceId. Call it for the head-to-head between two teams, or before you state a fact about it.
輸入參數askedlimitseasonteam_a必填team_b必填includeAllSeasons
query_roster
A team's roster and ratings
Returns a team's roster for a season, one row per player with an evidenceId: name, NTRP rating, wins, losses, matches and Desk level. Call it when someone asks who is on a team, or before you state a fact about a roster. Pass `season` when the person named a year, because without it the answer covers the current season. If `moreRows` is true, call again with a larger `limit`, up to 60.
輸入參數team必填askedlimitseasonincludeAllSeasons
query_player_history
A player's recent results
Returns the recorded lines a named player appeared in, as cited rows told from the player's side, with the player's record, which is already counted by season, team and stage. Call it when someone asks about a player's results, form or history. Never guess at their injury or availability, because the Desk does not hold it.
輸入參數askedlimitplayer必填seasonincludeAllSeasons
query_match_log
Desk level, match by match
Returns a player's match-by-match rating history for one season: each match they played, their level before and after it, and the other players on court with their levels then. Call it when someone asks how a player's level changed, how they reached it, what one result did to it, or asks to see their matches. Prefer it to query_player_history when the question is about the level rather than the results, because it follows the level match by match.
輸入參數askedplayer必填season
compute_aggregate
A team's win rate and counts
Works out one number for any covered team, in any league or season, in code from its recorded lines: `win_rate`, `win_count`, `loss_count` or `match_count`. Call it whenever you would state a count, an average or a win rate, and quote its value exactly rather than working one out. With no `phase` it counts the playoffs and sectionals too, so pass phase:'regular season' for a league record alone.
輸入參數kind必填team必填askedphaseseasonincludeAllSeasons
compute_roster_strength
Each rating group's record
Splits a team's roster by published NTRP level and gives each level group's players, wins, losses and win rate this season, over every league line those players appeared in. Call it for a roster's shape rather than its results, as in 'how strong is their 4.0 half' or 'who carries this team'. It works even before a season has been played, because it then reads the season before.
輸入參數team必填askedphaseseason
compute_match_line_ratings
Matches ranked by lineup strength
Ranks a team's recorded matches by how strong a lineup it fielded, from each player's current Desk level, so it is not a rating at the time of the match. Call it when someone asks which match had the strongest or weakest lineup, or how a team's line strength moved.
輸入參數team必填askedseasonincludeAllSeasons
query_player_rating
A player's Desk level and record
Returns the Desk's read of a named player: their Desk level, their record by season, team, stage and format, the model card id and the lines behind it. Call it when someone asks how strong a player is, or about their rating, level, trend or bump risk. The USTA band is not here, because it is the `rating` on a query_roster row. The Desk publishes no bump prediction.
輸入參數askedplayer必填
predict_matchup
One line's win chance
Gives the home side's win probability for one line between named players. It weighs each player's Desk level, how a pair plays together and who is available, while a player the Desk has not yet rated gets a default level. Call it when someone asks who would win, the odds of a matchup, or how a pairing stacks up. Needs a Desk Pass after the member's free forecast each week. Past that, a call gets the free part, with no chance for anything still to be played, and `deskPass`, whose `message` you give the person. Its error is free_forecast_used, or desk_pass_required for a key with no member.
輸入參數askedline_typeaway_players必填home_players必填
query_team_forecast
Upcoming matches
Returns a team's upcoming matches on the league schedule, or those of every team a player is on: the opponent, the day, the start time, and home or away. Call it for a next match, today's or tomorrow's match, or the schedule. Pass `team` for a named team, or `player` for a first-person ask like 'who am I playing'. It gives no team win chance. A team match's chance is only in the live playoff report from project_standings, which comes with the Desk Pass.
輸入參數teamaskedplayer
query_club_teams
A club's teams this year
Returns the teams a named club fields this year, and which of them plays next. Call it whenever someone asks about a whole club by name, before you narrow the question to a single team. For how the club is doing, call query_club, which reads the club's page. Pass any league words the person used in `qualifier`, such as 'combo', 'mixed', 'womens', '40 & over' or '3.5', because dropping them answers a different question.
輸入參數club必填askedqualifier
query_club
What a club's page shows
Returns what a club's page on The Tennis Desk shows, in one call. That is its teams in a season by league, each with its place in the Desk's league table and its record. It also gives the club's next matches, latest results and record against each other club. Call it when someone asks how a club is doing, its record against other clubs, or where its teams stand. For only its list of teams, or which plays next, query_club_teams is enough. Pass `club`: the club's name as people say it or as USTA prints it, or its page address or number. Pass `season`, a year, for that season's page, and `briefing` true for the club's week. A team's `firstPlace` says whether it can still finish first, which assumes each scheduled match is played. In a result, * marks a line won or lost by default.
輸入參數club必填askedseasonbriefing
query_my_teams
Your own teams
Returns the member's own teams, the ones they are on or have played for, which come from their affiliations. Call it when the person asks about their own teams, as in 'what teams am I on', and set thisYear:true for this year's. A question that names a team, a club or a player is about that one, so use the other tools for it, signed in or not. Needs a signed-in member, because it answers about them. A key with no member gets the error member_required.
輸入參數askedthisYear
query_cohort_standing
Where you rank by Desk level
Ranks a group of players by Desk level and gives the member's place in it. Call it for 'where do I stand', 'how do I compare to the top players', a ranking or a percentile, or the top players in an age group or level. Define the group with `ageBand`, `division` and `level`, or leave them out so it fills the group from the member's team. Needs a signed-in member, because it answers about them. A key with no member gets the error member_required.
輸入參數topNaskedlevelseasonageBanddivisionincludeAllSeasons
query_league_standings
A league table
Builds the Desk's league table for a team's flight, with the named team's place, which it ranks from recorded results by the league's own rule and tie-breaks. Call it for the standings, how a team finished, who won the league or 'the table'. Pass the team name, or nothing for the member's own team. For a whole league, pass `league` and `area` instead, such as "55 & over men's 8.0" and 'Marin'. Never pass a club or an area as the team.
輸入參數areateamaskedleagueseason
plan_lineup_from_availability
A lineup from NorCal availability
Plans a lineup from the availability a member's agent read on the USTA NorCal league site, so the agent can fill in the lineup form. Pass the team, the match and each player's answer in USTA's own words: yes, No, maybe, call last, First shift only or Second shift only. The result also holds the values for the lineup form, and what to confirm with the member before Save. Each line's win chance needs a Desk Pass after the member's free forecast each week. The Desk never acts on the USTA site, so the member, or their own agent in their own session, presses Save. Call it when someone pastes or describes who can play a match and asks for a lineup.
輸入參數dateteam必填askedseasonmatchIdopponentavailability必填
prepare_score_entry
Values for the score form
Prepares the values for the score form on the USTA NorCal league site, from the scores a member reports. Pass the team, the match and each line: its players on both sides, its set scores, and its status when a line was not completed. Give the sets from the member's own side, unless scoresFrom says otherwise. Pass posted too, with each line as NorCal shows it, so it can list every line where the two differ. The Desk never acts on the USTA site, so the member, or their own agent in their own session, presses Submit. Call it when someone wants to enter or check a match score on NorCal.
輸入參數dateteam必填askedlines必填postedseasonmatchIdopponentweAreHome
match_date_check
A home match date, checked
Checks a proposed date and time for a home match before the captain posts it on the USTA NorCal league site. Pass the team, the match and the proposed date and start time, and the format and second-shift time if the captain has them. It says whether the form offers that time, which formats the form offers for the team's lines, and whether the team already plays that day. The Desk never acts on the USTA site, so the captain, or their own agent in their own session, presses Submit. Call it when a captain asks whether a date works, or before an agent fills the post-dates form.
輸入參數dateteam必填askedformatseasonopponentproposedDate必填proposedTime必填secondShiftTime
availability_loop
Chase who hasn't answered
Finds the players who have not answered the next match on the USTA NorCal availability grid. Pass the team and the grid as your agent read it: each match column's header, and each player's row with one cell per column. It lists each player whose answer is blank or maybe, and writes one group message for the team with the deadline and the team grid link. Each line's win chance needs a Desk Pass after the member's free forecast each week. The Desk writes, and the captain sends every message from their own phone or email. Never send a text or an email yourself, and never read a teammate's phone or email. Call it when a captain asks who has not answered on NorCal, or wants reminder texts.
輸入參數rowsteamaskedformatseasonsignAscolumnsmatchIddeadlinelineupNow
read_docs
Paragraphs from the Desk's docs
Reads The Tennis Desk's own docs, word for word. They cover what the Desk is, a Desk level, what is free and what the Desk Pass adds, coverage and updates, agents, privacy and how a league table is ordered. Call it when someone asks about the Desk itself rather than a team, a player or a match. Pass `about`, a few words on what to find, and `pages` for a page you know. It needs no Desk Pass, and a call does not count toward the account's daily or monthly limit.
輸入參數aboutaskedpages
read_research
The Desk's research figures
Reads the Desk's published research about players in general, word for word. Each piece comes with its question, headline, answers and figures, the group of past players it counts and the day it was measured. Call it when someone asks about players or teams in general, such as how often players move up or back down, or home advantage. Never call it for one named player, team or match, because every figure is a rate over a group. Pass `about`, a few words on the question, or `pieces` for a piece you know. It needs no Desk Pass.
輸入參數aboutaskedpieces
query_coverage
What the Desk covers
Answers what the Desk covers: which areas, leagues, levels, clubs, teams and seasons are on record, and what kinds of question it can answer at all. Call it whenever someone asks what you can look up, what data you have, or which leagues, levels or areas are covered. It takes no arguments, because it reports the whole census rather than a slice of it.
輸入參數asked
project_standings
How a league could finish
Projects how a league table could finish, from the matches left and the Desk's line forecasts. It gives each team's likely place, its chance to finish first and, when the Desk knows the playoff cut, its chance to make the playoffs. It also says what the named team needs, while a Desk Pass adds the team's live playoff report. Call it for a team's playoff chances or what it needs. Pass the team, or `league` and `area` for a whole league, or neither for the member's own team. Needs a Desk Pass. Without one, a call gets the free part, with no chance in it, and `deskPass`, whose `message` you give the person.
輸入參數areateamaskedleague
query_playoff_history
Past playoff chances
Gives a team's playoff chances from a week ago and earlier, one a week, each as of its day. It also says what moved the chance most: the change between two days and the matches played between them. Call it for how a team's playoff chances have changed, or what its chances were last week. Pass the team, or nothing for the member's own team. It never gives today's chance: the `project_standings` tool gives that, with the Desk Pass.
輸入參數teamasked
query_forecast_results
How past forecasts did
Gives a team's latest matches that the Desk forecast before they were played. For each line, it gives the team's chance as the Desk logged it the night before, and whether the team won the line. It also gives each match's result. Call it for how the Desk's forecasts did for a team, or what the Desk gave a team in a past match. Pass the team, or nothing for the member's own team. It gives only matches already played, never a chance for a match still to come, which comes with the Desk Pass.
輸入參數teamasked
scout_team
A written scout of one team
Writes the Desk's scout of one team it covers: its ranked reads of who matters and how the lines go, each with its evidence. Call it when someone asks for a scout, a breakdown of a team, or how to beat a named team. Pass `team`, a team the Desk covers, by name or Desk page link. Never call it for a whole club, because a scout is of one team. Needs a Desk Pass. Without one, a call gets the free part, with no chance in it, and `deskPass`, whose `message` you give the person.
輸入參數team必填asked
get_desk_pass
Your Desk Pass and forecasts
Says whether the signed-in member holds the Desk Pass, when it renews or ends, how many forecasts they have left this week and when more come. Call it when someone asks about their Desk Pass or their forecasts. It takes no arguments. Needs a signed-in member, because it answers about them. A key with no member gets the error member_required.
輸入參數asked